rtw89: add Realtek 802.11ax driver
Subsystems (3)
Ping-Ke Shih
maintainerPATCH 23/24 rtw89: add SAR files
In reply to Ping-Ke ShihSAR stands for specific absorption rate. Driver controls TX power to follow the regulation of SAR.
--- drivers/net/wireless/realtek/rtw89/sar.c | 190 +++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/sar.h | 26 ++++ 2 files changed, 216 insertions(+) create mode 100644 drivers/net/wireless/realtek/rtw89/sar.c create mode 100644 drivers/net/wireless/realtek/rtw89/sar.h
drivers/net/wireless/realtek/rtw89/sar.c new file +190 -0
@@ -0,0 +1,190 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* Copyright(c) 2019-2020 Realtek Corporation +*/ + +#include "debug.h" +#include "sar.h" + +static int rtw89_query_sar_config_common (struct rtw89_dev *rtwdev,s32 *cfg) +{ +struct rtw89_sar_cfg_common *rtwsar = &rtwdev->sar.cfg_common; +enum rtw89_subband subband = rtwdev->hal.current_subband; + +if (!rtwsar->set[subband]) +return -ENODATA ; + + *cfg = rtwsar->cfg[subband]; +return 0 ; +} + +static const +struct rtw89_sar_handler rtw89_sar_handlers[RTW89_SAR_SOURCE_NR ] = { + [RTW89_SAR_SOURCE_COMMON ] = { + .descr_sar_source ="RTW89_SAR_SOURCE_COMMON" , + .txpwr_factor_sar =2 , + .query_sar_config = rtw89_query_sar_config_common, + }, +}; + +#define rtw89_sar_set_src (_dev, _src, _cfg_name, _cfg_data) \ + do { \ + typeof(_src) _s = (_src); \ + typeof(_dev) _d = (_dev); \ + BUILD_BUG_ON(!rtw89_sar_handlers[_s].descr_sar_source); \ + BUILD_BUG_ON(!rtw89_sar_handlers[_s].query_sar_config); \ + lockdep_assert_held(&_d->mutex); \ + _d->sar._cfg_name = *(_cfg_data); \ + _d->sar.src = _s; \ + } while (0) + +static s8 rtw89_txpwr_sar_to_mac (struct rtw89_dev *rtwdev,u8 fct,s32 cfg) +{ +const u8 fct_mac = rtwdev->chip->txpwr_factor_mac; +s32 cfg_mac; + + cfg_mac = fct > fct_mac ? + cfg >> (fct - fct_mac) : cfg << (fct_mac - fct); + +return (s8 )clamp_t (s32, cfg_mac, +RTW89_SAR_TXPWR_MAC_MIN , +RTW89_SAR_TXPWR_MAC_MAX ); +} + +s8 rtw89_query_sar (struct rtw89_dev *rtwdev) +{ +const enum rtw89_sar_sources src = rtwdev->sar.src; +/* its members are protected by rtw89_sar_set_src() */ +const struct rtw89_sar_handler *sar_hdl = &rtw89_sar_handlers[src]; +int ret; +s32 cfg; +u8 fct; + +lockdep_assert_held (&rtwdev->mutex); + +if (src ==RTW89_SAR_SOURCE_NONE ) +return RTW89_SAR_TXPWR_MAC_MAX ; + + ret = sar_hdl->query_sar_config (rtwdev, &cfg); +if (ret) +return RTW89_SAR_TXPWR_MAC_MAX ; + + fct = sar_hdl->txpwr_factor_sar; + +return rtw89_txpwr_sar_to_mac (rtwdev, fct, cfg); +} + +void rtw89_print_sar (struct seq_file *m,struct rtw89_dev *rtwdev) +{ +const enum rtw89_sar_sources src = rtwdev->sar.src; +/* its members are protected by rtw89_sar_set_src() */ +const struct rtw89_sar_handler *sar_hdl = &rtw89_sar_handlers[src]; +const u8 fct_mac = rtwdev->chip->txpwr_factor_mac; +int ret; +s32 cfg; +u8 fct; + +lockdep_assert_held (&rtwdev->mutex); + +if (src ==RTW89_SAR_SOURCE_NONE ) { +seq_puts (m,"no SAR is applied\n" ); +return ; + } + +seq_printf (m,"source: %d (%s)\n" , src, sar_hdl->descr_sar_source); + + ret = sar_hdl->query_sar_config (rtwdev, &cfg); +if (ret) { +seq_printf (m,"config: return code: %d\n" , ret); +seq_printf (m,"assign: max setting: %d (unit: 1/%lu dBm)\n" , +RTW89_SAR_TXPWR_MAC_MAX ,BIT (fct_mac)); +return ; + } + + fct = sar_hdl->txpwr_factor_sar; + +seq_printf (m,"config: %d (unit: 1/%lu dBm)\n" , cfg,BIT (fct)); +} + +static int rtw89_apply_sar_common (struct rtw89_dev *rtwdev, +const struct rtw89_sar_cfg_common *sar) +{ +enum rtw89_sar_sources src; +int ret =0 ; + +mutex_lock (&rtwdev->mutex); + + src = rtwdev->sar.src; +if (src !=RTW89_SAR_SOURCE_NONE && src !=RTW89_SAR_SOURCE_COMMON ) { +rtw89_warn (rtwdev,"SAR source: %d is in use" , src); + ret = -EBUSY ; + goto exit; + } + +rtw89_sar_set_src (rtwdev,RTW89_SAR_SOURCE_COMMON , cfg_common, sar); +rtw89_chip_set_txpwr (rtwdev); + +exit: +mutex_unlock (&rtwdev->mutex); +return ret; +} + +static const u8 rtw89_common_sar_subband_map[] = { +RTW89_CH_2G , +RTW89_CH_5G_BAND_1 , +RTW89_CH_5G_BAND_3 , +RTW89_CH_5G_BAND_4 , +}; + +static const struct cfg80211_sar_freq_ranges rtw89_common_sar_freq_ranges[] = { + { .start_freq =2412 , .end_freq =2484 , }, + { .start_freq =5180 , .end_freq =5320 , }, + { .start_freq =5500 , .end_freq =5720 , }, + { .start_freq =5745 , .end_freq =5825 , }, +}; + +static_assert (ARRAY_SIZE (rtw89_common_sar_subband_map) == +ARRAY_SIZE (rtw89_common_sar_freq_ranges)); + +const struct cfg80211_sar_capa rtw89_sar_capa = { + .type =NL80211_SAR_TYPE_POWER , + .num_freq_ranges =ARRAY_SIZE (rtw89_common_sar_freq_ranges), + .freq_ranges = rtw89_common_sar_freq_ranges, +}; + +int rtw89_ops_set_sar_specs (struct ieee80211_hw *hw, +const struct cfg80211_sar_specs *sar) +{ +struct rtw89_dev *rtwdev = hw->priv; +struct rtw89_sar_cfg_common sar_common = {0 }; +u8 fct; +u32 freq_start; +u32 freq_end; +u32 band; +s32 power; +u32 i, idx; + +if (sar->type !=NL80211_SAR_TYPE_POWER ) +return -EINVAL ; + + fct = rtw89_sar_handlers[RTW89_SAR_SOURCE_COMMON ].txpwr_factor_sar; + +for (i =0 ; i < sar->num_sub_specs; i++) { + idx = sar->sub_specs[i].freq_range_index; +if (idx >=ARRAY_SIZE (rtw89_common_sar_freq_ranges)) +return -EINVAL ; + + freq_start = rtw89_common_sar_freq_ranges[idx].start_freq; + freq_end = rtw89_common_sar_freq_ranges[idx].end_freq; + band = rtw89_common_sar_subband_map[idx]; + power = sar->sub_specs[i].power; + +rtw89_info (rtwdev,"On freq %u to %u, " , freq_start, freq_end); +rtw89_info (rtwdev,"set SAR power limit %d (unit: 1/%lu dBm)\n" , + power,BIT (fct)); + + sar_common.set[band] = true; + sar_common.cfg[band] = power; + } + +return rtw89_apply_sar_common (rtwdev, &sar_common); +}
drivers/net/wireless/realtek/rtw89/sar.h new file +26 -0
@@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ +/* Copyright(c) 2019-2020 Realtek Corporation +*/ + +#ifndef __RTW89_SAR_H__ +#define __RTW89_SAR_H__ + +#include "core.h" + +#define RTW89_SAR_TXPWR_MAC_MAX S8_MAX +#define RTW89_SAR_TXPWR_MAC_MIN S8_MIN + +struct rtw89_sar_handler { +const char *descr_sar_source; +u8 txpwr_factor_sar; +int (*query_sar_config)(struct rtw89_dev *rtwdev,s32 *cfg); +}; + +extern const struct cfg80211_sar_capa rtw89_sar_capa; + +s8 rtw89_query_sar (struct rtw89_dev *rtwdev); +void rtw89_print_sar (struct seq_file *m,struct rtw89_dev *rtwdev); +int rtw89_ops_set_sar_specs (struct ieee80211_hw *hw, +const struct cfg80211_sar_specs *sar); + +#endif
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 24/24 rtw89: add Kconfig and Makefile
In reply to Ping-Ke ShihWith Kconfig and Makefile, we can build rtw89 and support 8852AE chip.
--- drivers/net/wireless/realtek/Kconfig | 1 + drivers/net/wireless/realtek/Makefile | 1 + drivers/net/wireless/realtek/rtw89/Kconfig | 50 +++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/Makefile | 26 +++++++++++ 4 files changed, 78 insertions(+) create mode 100644 drivers/net/wireless/realtek/rtw89/Kconfig create mode 100644 drivers/net/wireless/realtek/rtw89/Makefile
drivers/net/wireless/realtek/Kconfig +1 -0
@@ -16,5 +16,6 @@ source "drivers/net/wireless/realtek/rtl818x/Kconfig" source "drivers/net/wireless/realtek/rtlwifi/Kconfig" source "drivers/net/wireless/realtek/rtl8xxxu/Kconfig" source "drivers/net/wireless/realtek/rtw88/Kconfig" +source "drivers/net/wireless/realtek/rtw89/Kconfig" endif # WLAN_VENDOR_REALTEK
drivers/net/wireless/realtek/Makefile +1 -0
@@ -8,4 +8,5 @@ obj-$(CONFIG_RTL8187) += rtl818x/ obj-$(CONFIG_RTLWIFI) += rtlwifi/ obj-$(CONFIG_RTL8XXXU) += rtl8xxxu/ obj-$(CONFIG_RTW88) += rtw88/ +obj-$(CONFIG_RTW89) += rtw89/
drivers/net/wireless/realtek/rtw89/Kconfig new file +50 -0
50 lines not on this page · raw message
drivers/net/wireless/realtek/rtw89/Makefile new file +26 -0
@@ -0,0 +1,26 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + +obj-$(CONFIG_RTW89_CORE) += rtw89_core.o +rtw89_core-y += core.o \ + mac80211.o \ + mac.o \ + phy.o \ + fw.o \ + rtw8852a.o \ + rtw8852a_table.o \ + rtw8852a_rfk.o \ + rtw8852a_rfk_table.o \ + cam.o \ + efuse.o \ + regd.o \ + sar.o \ + coex.o \ + ps.o \ + util.o \ + ser.o + +rtw89_core-$(CONFIG_RTW89_DEBUG) += debug.o + +obj-$(CONFIG_RTW89_PCI) += rtw89_pci.o +rtw89_pci-y := pci.o +
Signature · 1 line
2.25.1
kernel test robot
build botRe: [PATCH 24/24] rtw89: add Kconfig and Makefile
I love your patch! Yet something to improve:
Hi Ping-Ke,
I love your patch! Yet something to improve:
[auto build test ERROR on wireless-drivers-next/master]
[also build test ERROR on wireless-drivers/master v5.13-rc6 next-20210618] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Ping-Ke-Shih/rtw89-add-Realtek-802-11ax-driver/20210618-145007 base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master config: arm-allyesconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/f768bef58aeecd255f4cf55d014c36c91e183065
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ping-Ke-Shih/rtw89-add-Realtek-802-11ax-driver/20210618-145007 git checkout f768bef58aeecd255f4cf55d014c36c91e183065
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
arm-linux-gnueabi-ld: drivers/net/wireless/realtek/rtw89/core.o: in function `rtw89_traffic_stats_calc':
>> core.c:(.text+0x534): undefined reference to `__aeabi_uldivmod' >> arm-linux-gnueabi-ld: core.c:(.text+0x58c): undefined reference to `__aeabi_uldivmod'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
kernel test robot
build botRe: [PATCH 24/24] rtw89: add Kconfig and Makefile
In reply to Ping-Ke ShihI love your patch! Yet something to improve:
Hi Ping-Ke,
I love your patch! Yet something to improve:
[auto build test ERROR on wireless-drivers-next/master]
[also build test ERROR on wireless-drivers/master v5.13-rc6 next-20210618] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Ping-Ke-Shih/rtw89-add-Realtek-802-11ax-driver/20210618-145007 base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master config: mips-allmodconfig (attached as .config) compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/f768bef58aeecd255f4cf55d014c36c91e183065
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ping-Ke-Shih/rtw89-add-Realtek-802-11ax-driver/20210618-145007 git checkout f768bef58aeecd255f4cf55d014c36c91e183065
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>, old ones prefixed by <<):
>> ERROR: modpost: "__udivdi3" [drivers/net/wireless/realtek/rtw89/rtw89_core.ko] undefined!
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
Pkshih
maintainerRE: [PATCH 24/24] rtw89: add Kconfig and Makefile
Quoted 36 lines
-----Original Message-----
From: kernel test robot [mailto:lkp(a)intel.com]
Sent: Saturday, June 19, 2021 11:19 AM
To: Pkshih; kvalo(a)codeaurora.org
Cc: kbuild-all(a)lists.01.org; linux-wireless(a)vger.kernel.org
Subject: Re: [PATCH 24/24] rtw89: addKconfigandMakefileHi Ping-Ke,
I love your patch! Yet something to improve:
[auto build test ERROR on wireless-drivers-next/master]
[also build test ERROR on wireless-drivers/master v5.13-rc6 next-20210618] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]url:
https://github.com/0day-ci/linux/commits/Ping-Ke-Shih/rtw89-add-Realtek-802-11ax-driver/20210618-1
45007
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: mips-allmodconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/f768bef58aeecd255f4cf55d014c36c91e183065
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Ping-Ke-Shih/rtw89-add-Realtek-802-11ax-driver/20210618-145007
git checkoutf768bef58aeecd255f4cf55d014c36c91e183065
# save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
Quoted 7 lines
If you fix the issue, kindly add following tag as appropriate
Reported-by kernel test robot <[email protected]>All errors (new ones prefixed by >>, old ones prefixed by <<):
Quoted 1 line
Quoted 1 line
ERROR: modpost: "
__udivdi3" [drivers/net/wireless/realtek/rtw89/rtw89_core.ko] undefined!
Will fix it by DIV_ROUND_DOWN_ULL() in next submission.
--
Ping-Ke
Pkshih
maintainerQuoted 7 lines
-----Original Message-----
From: Ping-Ke Shih [mailto:[email protected]]
Sent: Friday, June 18, 2021 2:46 PM
To: [email protected]
Cc: [email protected]
Subject: [PATCH 00/24] rtw89: add Realtek 802.11ax driver
Sorry. I forget to add "v5" prefix, but I think it's confusing people if I send this patchset again.
Quoted 47 lines
This driver named rtw89, which is the next generation of rtw88, supports Realtek 8852AE 802.11ax 2x2 chip whose new features are OFDMA, DBCC, Spatial reuse, TWT and BSS coloring; now some of them aren't implemented though.
The chip architecture is entirely different from the chips supported by rtw88 like RTL8822CE 802.11ac chip. First of all, register address ranges are totally redefined, so it's impossible to reuse register definition. To communicate with firmware, new H2C/C2H format is proposed. In order to have better utilization, TX DMA flow is changed to two stages DMA. To provide rich RX status information, additional RX PPDU packets are added.
Since there are so many differences mentioned above, we decide to propose a new driver. It has many authors, they are listed in alphabetic order:
Chin-Yen Lee <[email protected]>
Ping-Ke Shih <[email protected]>
Po Hao Huang <[email protected]>
Tzu-En Huang <[email protected]>
Vincent Fann <[email protected]>
Yan-Hsuan Chuang <[email protected]>
Zong-Zhe Yang <[email protected]>v5:
- add OFDMA feature
- improve BT coexistence performance
- improve power save mode
- support SAR
- fine tune performance
- firmware: rtw89: 8852a: update fw to v0.13.24.0https://github.com/pkshih/linux-firmware.git pick the commit a5b79c4790da3eb3690e23554225ef8db464f2c6v4:
- add basic BT coexistence features
- add power save mode, so an new patch (two files) is added
- fine tune performance
- add debugfs for debugging coex, bb, ...
v3:
- fix "networking block comments" reported by checkpatch
- AddMODULE_DEVICE_TABLE()generated by Thomas Backlund <[email protected]>
- Add missed BB settings
- error handle of RX BD and DESC length
- reduce debug level of C2H ACKs
- fix rekey failure due to wrong operator
v2:
- fix compiler warnings made by W=1
Quoted 4 lines
Reported-by kernel test robot <[email protected]>- sort header file alphabetically
- fix "networking block comments" reported by checkpatch
Hi Kalle and wireless experts,
I submitted first version of rtw89 at the end of 2020, and continue to add features and fine tune driver by following versions. After half year development, I think this driver has been stable, so I'd like to inquiry if experts have time to help review this driver. Not only reviewing but you want to verify this driver, a 8852AE demoboard is needed; please feel free to contact me privately.
--
Ping-Ke
cover rtw89: add Realtek 802.11ax driver
In reply to Ping-Ke ShihHi Ping-Ke,
After applied your patches on 5.17-rc7, tested on pci device:
04:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8852]
I found the performance is a bit poor on TX especially.
Tested on Intel AX210, it's result is TX 461Mb/s and RX 547Mb/s at the same position.
$ iperf3 -c 192.168.1.7 Connecting to host 192.168.1.7, port 5201 [ 5] local 192.168.1.6 port 40942 connected to 192.168.1.7 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 26.2 MBytes 220 Mbits/sec 0 1.12 MBytes [ 5] 1.00-2.00 sec 21.2 MBytes 178 Mbits/sec 0 1.76 MBytes [ 5] 2.00-3.00 sec 33.8 MBytes 283 Mbits/sec 0 2.00 MBytes [ 5] 3.00-4.00 sec 31.2 MBytes 262 Mbits/sec 0 2.12 MBytes [ 5] 4.00-5.00 sec 30.0 MBytes 252 Mbits/sec 0 2.38 MBytes [ 5] 5.00-6.00 sec 31.2 MBytes 262 Mbits/sec 0 2.56 MBytes [ 5] 6.00-7.00 sec 31.2 MBytes 262 Mbits/sec 0 2.56 MBytes [ 5] 7.00-8.00 sec 27.5 MBytes 231 Mbits/sec 0 2.56 MBytes [ 5] 8.00-9.00 sec 35.0 MBytes 294 Mbits/sec 0 2.56 MBytes [ 5] 9.00-10.00 sec 31.2 MBytes 262 Mbits/sec 0 2.69 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 299 MBytes 251 Mbits/sec 0 sender [ 5] 0.00-10.01 sec 296 MBytes 248 Mbits/sec receiver
iperf Done.
$ iperf3 -c 192.168.1.7 -R Connecting to host 192.168.1.7, port 5201 Reverse mode, remote host 192.168.1.7 is sending [ 5] local 192.168.1.6 port 40946 connected to 192.168.1.7 port 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 46.4 MBytes 389 Mbits/sec [ 5] 1.00-2.00 sec 48.7 MBytes 408 Mbits/sec [ 5] 2.00-3.00 sec 48.5 MBytes 407 Mbits/sec [ 5] 3.00-4.00 sec 51.9 MBytes 435 Mbits/sec [ 5] 4.00-5.00 sec 47.8 MBytes 401 Mbits/sec [ 5] 5.00-6.00 sec 50.7 MBytes 426 Mbits/sec [ 5] 6.00-7.00 sec 48.2 MBytes 404 Mbits/sec [ 5] 7.00-8.00 sec 48.2 MBytes 405 Mbits/sec [ 5] 8.00-9.00 sec 51.0 MBytes 428 Mbits/sec [ 5] 9.00-10.00 sec 52.0 MBytes 436 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 497 MBytes 417 Mbits/sec 126 sender [ 5] 0.00-10.00 sec 493 MBytes 414 Mbits/sec receiver
iperf Done.
Also I found some errors when stress test, not sure how to reproduce yet, copy log here:
kernel: rtw89_pci 0000:04:00.0: Firmware version 0.13.24.0, cmd version 0, type 1
kernel: rtw89_pci 0000:04:00.0: Firmware version 0.13.24.0, cmd version 0, type 3
kernel: rtw89_pci 0000:04:00.0: chip rfe_type is 1
kernel: initcall rtw89_pci_driver_init+0x0/0x1000 [rtw89_pci] returned 0 after 26621 usecs
kernel: rtw89_pci 0000:04:00.0 wlp4s0: renamed from wlan0
kernel: wlp4s0: authenticate with 9c:d3:6d:a3:b2:e7
kernel: wlp4s0: send auth to 9c:d3:6d:a3:b2:e7 (try 1/3)
kernel: wlp4s0: send auth to 9c:d3:6d:a3:b2:e7 (try 2/3)
kernel: wlp4s0: send auth to 9c:d3:6d:a3:b2:e7 (try 3/3)
kernel: wlp4s0: authentication with 9c:d3:6d:a3:b2:e7 timed out
kernel: wlp4s0: authenticate with 9c:d3:6d:a3:b2:e7
kernel: wlp4s0: send auth to 9c:d3:6d:a3:b2:e7 (try 1/3)
kernel: wlp4s0: authenticated
kernel: wlp4s0: associate with 9c:d3:6d:a3:b2:e7 (try 1/3)
kernel: wlp4s0: RX AssocResp from 9c:d3:6d:a3:b2:e7 (capab=0x11 status=0 aid=9)
kernel: wlp4s0: associated
kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlp4s0: link becomes ready
kernel: rtw89_pci 0000:04:00.0: FW status = 0xb9001100
kernel: rtw89_pci 0000:04:00.0: FW BADADDR = 0x0
kernel: rtw89_pci 0000:04:00.0: FW EPC/RA = 0x0
kernel: rtw89_pci 0000:04:00.0: FW MISC = 0xb8990c7b
kernel: rtw89_pci 0000:04:00.0: R_AX_HALT_C2H = 0x10
kernel: rtw89_pci 0000:04:00.0: R_AX_SER_DBG_INFO = 0x41000001
kernel: rtw89_pci 0000:04:00.0: [ERR]fw PC = 0xb8991bcb
kernel: rtw89_pci 0000:04:00.0: [ERR]fw PC = 0xb8991bd5
kernel: rtw89_pci 0000:04:00.0: [ERR]fw PC = 0xb8991acb
kernel: rtw89_pci 0000:04:00.0: [ERR]fw PC = 0xbfc00180
kernel: rtw89_pci 0000:04:00.0: [ERR]fw PC = 0xb8991bf9
kernel: rtw89_pci 0000:04:00.0: [ERR]fw PC = 0xb8991ba7
kernel: rtw89_pci 0000:04:00.0: [ERR]fw PC = 0xb8991bd3
kernel: rtw89_pci 0000:04:00.0: [ERR]fw PC = 0xb8991ae3
kernel: rtw89_pci 0000:04:00.0: [ERR]fw PC = 0xb8991aad
kernel: rtw89_pci 0000:04:00.0: [ERR]fw PC = 0xb8991ba7
kernel: rtw89_pci 0000:04:00.0: [ERR]fw PC = 0xb8991bd1
kernel: rtw89_pci 0000:04:00.0: [ERR]fw PC = 0xb8991ac5
kernel: rtw89_pci 0000:04:00.0: [ERR]fw PC = 0xb8991ba7
kernel: rtw89_pci 0000:04:00.0: [ERR]fw PC = 0xb8991ad1
kernel: rtw89_pci 0000:04:00.0: [ERR]fw PC = 0xb8991bbb
kernel: rtw89_pci 0000:04:00.0: --->
err=0x10
Hi,
Previous result is from a single antenna PCI card of 8852AE. After test on another Laptop with 8852AE, it works fine. Result:
AP ASUS AX86u: TX 660M RX 880M
AP Netgear R7800: TX 500M RX 561M
Looks like the performance is affected by antenna.
The error log is not reproduced again.
Aaron
Quoted 95 lines · Aaron Ma
Hi Ping-Ke,
After applied your patches on 5.17-rc7, tested on pci device:
04:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8852]I found the performance is a bit poor on TX especially.
Tested on Intel AX210, it's result is TX 461Mb/s and RX 547Mb/s at the same position.$ iperf3 -c 192.168.1.7 Connecting to host 192.168.1.7, port 5201 [ 5] local 192.168.1.6 port 40942 connected to 192.168.1.7 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 26.2 MBytes 220 Mbits/sec 0 1.12 MBytes [ 5] 1.00-2.00 sec 21.2 MBytes 178 Mbits/sec 0 1.76 MBytes [ 5] 2.00-3.00 sec 33.8 MBytes 283 Mbits/sec 0 2.00 MBytes [ 5] 3.00-4.00 sec 31.2 MBytes 262 Mbits/sec 0 2.12 MBytes [ 5] 4.00-5.00 sec 30.0 MBytes 252 Mbits/sec 0 2.38 MBytes [ 5] 5.00-6.00 sec 31.2 MBytes 262 Mbits/sec 0 2.56 MBytes [ 5] 6.00-7.00 sec 31.2 MBytes 262 Mbits/sec 0 2.56 MBytes [ 5] 7.00-8.00 sec 27.5 MBytes 231 Mbits/sec 0 2.56 MBytes [ 5] 8.00-9.00 sec 35.0 MBytes 294 Mbits/sec 0 2.56 MBytes [ 5] 9.00-10.00 sec 31.2 MBytes 262 Mbits/sec 0 2.69 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 299 MBytes 251 Mbits/sec 0 sender [ 5] 0.00-10.01 sec 296 MBytes 248 Mbits/sec receiveriperf Done.
$ iperf3 -c 192.168.1.7 -R Connecting to host 192.168.1.7, port 5201 Reverse mode, remote host 192.168.1.7 is sending [ 5] local 192.168.1.6 port 40946 connected to 192.168.1.7 port 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 46.4 MBytes 389 Mbits/sec [ 5] 1.00-2.00 sec 48.7 MBytes 408 Mbits/sec [ 5] 2.00-3.00 sec 48.5 MBytes 407 Mbits/sec [ 5] 3.00-4.00 sec 51.9 MBytes 435 Mbits/sec [ 5] 4.00-5.00 sec 47.8 MBytes 401 Mbits/sec [ 5] 5.00-6.00 sec 50.7 MBytes 426 Mbits/sec [ 5] 6.00-7.00 sec 48.2 MBytes 404 Mbits/sec [ 5] 7.00-8.00 sec 48.2 MBytes 405 Mbits/sec [ 5] 8.00-9.00 sec 51.0 MBytes 428 Mbits/sec [ 5] 9.00-10.00 sec 52.0 MBytes 436 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 497 MBytes 417 Mbits/sec 126 sender [ 5] 0.00-10.00 sec 493 MBytes 414 Mbits/sec receiveriperf Done.
Also I found some errors when stress test, not sure how to reproduce yet, copy log here:
kernel:
rtw89_pci0000:04:00.0: Firmware version 0.13.24.0, cmd version 0, type 1
kernel:rtw89_pci0000:04:00.0: Firmware version 0.13.24.0, cmd version 0, type 3
kernel:rtw89_pci0000:04:00.0: chiprfe_typeis 1
kernel: initcallrtw89_pci_driver_init+0x0/0x1000[rtw89_pci] returned 0 after 26621 usecs
kernel:rtw89_pci0000:04:00.0 wlp4s0: renamed from wlan0
kernel: wlp4s0: authenticate with 9c:d3:6d:a3:b2:e7
kernel: wlp4s0: send auth to 9c:d3:6d:a3:b2:e7 (try 1/3)
kernel: wlp4s0: send auth to 9c:d3:6d:a3:b2:e7 (try 2/3)
kernel: wlp4s0: send auth to 9c:d3:6d:a3:b2:e7 (try 3/3)
kernel: wlp4s0: authentication with 9c:d3:6d:a3:b2:e7 timed out
kernel: wlp4s0: authenticate with 9c:d3:6d:a3:b2:e7
kernel: wlp4s0: send auth to 9c:d3:6d:a3:b2:e7 (try 1/3)
kernel: wlp4s0: authenticated
kernel: wlp4s0: associate with 9c:d3:6d:a3:b2:e7 (try 1/3)
kernel: wlp4s0: RX AssocResp from 9c:d3:6d:a3:b2:e7 (capab=0x11 status=0 aid=9)
kernel: wlp4s0: associated
kernel: IPv6:ADDRCONF(NETDEV_CHANGE): wlp4s0: link becomes ready
kernel:rtw89_pci0000:04:00.0: FW status =0xb9001100
kernel:rtw89_pci0000:04:00.0: FW BADADDR =0x0
kernel:rtw89_pci0000:04:00.0: FW EPC/RA =0x0
kernel:rtw89_pci0000:04:00.0: FW MISC =0xb8990c7b
kernel:rtw89_pci0000:04:00.0:R_AX_HALT_C2H=0x10
kernel:rtw89_pci0000:04:00.0:R_AX_SER_DBG_INFO=0x41000001
kernel:rtw89_pci0000:04:00.0: [ERR]fw PC =0xb8991bcb
kernel:rtw89_pci0000:04:00.0: [ERR]fw PC =0xb8991bd5
kernel:rtw89_pci0000:04:00.0: [ERR]fw PC =0xb8991acb
kernel:rtw89_pci0000:04:00.0: [ERR]fw PC =0xbfc00180
kernel:rtw89_pci0000:04:00.0: [ERR]fw PC =0xb8991bf9
kernel:rtw89_pci0000:04:00.0: [ERR]fw PC =0xb8991ba7
kernel:rtw89_pci0000:04:00.0: [ERR]fw PC =0xb8991bd3
kernel:rtw89_pci0000:04:00.0: [ERR]fw PC =0xb8991ae3
kernel:rtw89_pci0000:04:00.0: [ERR]fw PC =0xb8991aad
kernel:rtw89_pci0000:04:00.0: [ERR]fw PC =0xb8991ba7
kernel:rtw89_pci0000:04:00.0: [ERR]fw PC =0xb8991bd1
kernel:rtw89_pci0000:04:00.0: [ERR]fw PC =0xb8991ac5
kernel:rtw89_pci0000:04:00.0: [ERR]fw PC =0xb8991ba7
kernel:rtw89_pci0000:04:00.0: [ERR]fw PC =0xb8991ad1
kernel:rtw89_pci0000:04:00.0: [ERR]fw PC =0xb8991bbb
kernel:rtw89_pci0000:04:00.0: --->err=0x10