- 22 Nov, 2023 3 commits
-
-
Zong-Zhe Yang authored
According to BIOS configuration of Realtek ACPI DSM function 4, RTW89_ACPI_DSM_FUNC_6G_BP, we handle the regd policy of 6 GHz. Policy defines two modes as below. 1. `BLOCK` mode: The countries in configured list are blocked. 2. `ALLOW` mode: _Only_ the countries in configured list are allowed. (i.e. others are all blocked.) Then, when receiving regulatory notification at runtime, if 6 GHz is blocked on the country, 6 GHz channels will be disabled. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231114091359.50664-3-pkshih@realtek.com
-
Zong-Zhe Yang authored
Realtek ACPI DSM func 4, RTW89_ACPI_DSM_FUNC_6G_BP, accepts a configuration via ACPI buffer as below. | index | description | ------------------------- | [0-2] | signature | | [3] | reserved | | [4] | policy mode | | [5] | country count | | [6-] | country list | Through this function, BIOS can indicate to allow/block 6 GHz on some specific countries. Still, driver should follow regd first before taking this configuration into account. Besides, add a bit in debug mask for ACPI. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231114091359.50664-2-pkshih@realtek.com
-
Dmitry Antipov authored
Since 'drv_priv' is an in-place member allocated at the end of 'struct ieee80211_sta', it can't be NULL and so relevant checks in 'rtl_action_proc()' and 'rtl_tx_agg_start()' may be dropped. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231113144734.197359-2-dmantipov@yandex.ru
-
- 14 Nov, 2023 10 commits
-
-
Ping-Ke Shih authored
To reduce interrupts, configure the mitigation setting of 8922AE when bringing interface up, and then check situations to decide turning on or off the function. With this, interrupt count decreases to 20,141 from 202,141 in period of 20 seconds. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231110012319.12727-8-pkshih@realtek.com
-
Ping-Ke Shih authored
To reduce interrupt count, configure mitigation register with thresholds of time and packet count. We missed that 8852CE uses different register address, so correct it. Then, interrupt counts down to 30,763 from 229,825 during stress test in 20 seconds. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231110012319.12727-7-pkshih@realtek.com
-
Ping-Ke Shih authored
The handlers include three parts -- 1) configure interrupt mask; 2) enable/disable interrupt; 3) recognize (read) interrupt status. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231110012319.12727-6-pkshih@realtek.com
-
Ping-Ke Shih authored
For WiFi 7, interrupt status registers and their definitions are changed a lot, but the logic is still the same, so define fields to reuse the code. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231110012319.12727-5-pkshih@realtek.com
-
Ping-Ke Shih authored
At probe stage, we only do partial initialization to enable ability to download firmware and read capabilities. After that, we use this pre_deinit to disable HCI to save power. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231110012319.12727-4-pkshih@realtek.com
-
Zong-Zhe Yang authored
Level 1 recovery is to recover TX/RX rings, so it needs PCI to stop/start DMA. But, different chip gen have different implementations, either register address/mask or function flow. So, configure callback of stop/start DMA by chip gen. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231110012319.12727-3-pkshih@realtek.com
-
Zong-Zhe Yang authored
Configure callback of reset BDRAM (buffer descriptor RAM) by chip gen. Refine the one of 802.11ax chip gen and drop a redundant duplicate of it in 802.11ax chip gen. Then, assign right callback of rst_bdram for HCI ops which needs to do callback according to chip gen. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231110012319.12727-2-pkshih@realtek.com
-
Jiapeng Chong authored
Variable len is not effectively used, so delete it. drivers/net/wireless/intel/iwlegacy/4965-mac.c:4234:7: warning: variable 'len' set but not used. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7223Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231110073602.16846-1-jiapeng.chong@linux.alibaba.com
-
Shiji Yang authored
Refer to Mediatek vendor driver RxDCOC_Calibration() function, when performing gainfreeze calibration, we should write register 140 instead of 141. This fix can reduce the total calibration time from 6 seconds to 1 second. Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/TYAP286MB0315B13B89DF57B6B27BB854BCAFA@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM
-
Arnd Bergmann authored
Libertas no longer references the iw_handler infrastructure or wext_spy, so neither of the 'select' statements are used any more. Fixes: e86dc1ca ("Libertas: cfg80211 support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231108153409.1065286-1-arnd@kernel.org
-
- 08 Nov, 2023 14 commits
-
-
Shiji Yang authored
When a hardware reset is triggered, all registers are reset, so all queues are forced to stop in hardware interface. However, mac80211 will not automatically stop the queue. If we don't manually stop the beacon queue, the queue will be deadlocked and unable to start again. This patch fixes the issue where Apple devices cannot connect to the AP after calling ieee80211_restart_hw(). Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/TYAP286MB031530EB6D98DCE4DF20766CBCA4A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM
-
Shiji Yang authored
rt2800 has a lot of registers to control the RTS enable/disable status for different rates. And the driver control them via rt2800_set_rts_threshold(). When RTS was disabled in user interface, this function won't be called at all. This means that the RTS is still 'on' for CCK and OFDM rates. So we'd better to disable them by default because it should be like this. The RTS for HT20 and HT40 is already default off so we don't need to touch them. If we toggle the RTS status, these register bits will be enable/disable again by rt2800_set_rts_threshold(). Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/TYAP286MB03155DDB953155B7A2DE849ABCA4A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM
-
Shiji Yang authored
When I tried to fix the watchdog of rt2800, I found that sometimes the watchdog can not reset the hung device. This is because the queue is not completely stuck, it just becomes very slow. The MTK vendor driver for the new chip MT7603/MT7612 has a DMA busy watchdog to detect device hangs by checking DMA busy status. This watchdog implementation is something similar to it. To reduce unnecessary reset, we can check the INT_SOURCE_CSR register together as I found that when the radio hung, the RX/TX coherent interrupt will always stuck at triggered state. The 'watchdog' module parameter has been extended to control all watchdogs(0=disabled, 1=hang watchdog, 2=DMA watchdog, 3=both). This new watchdog function is a slight schedule and it won't affect the transmission speed. So we can turn on it by default. Due to the INT_SOURCE_CSR register is invalid on rt2800 USB NICs, the DMA busy watchdog will be automatically disabled for them. Tested on MT7620 and RT5350. Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/TYAP286MB0315D7462CE08A119A99DE34BCA4A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM
-
Chih-Kang Chang authored
The broadcast packets will be filtered in the FIF_ALLMULTI flag in the original code, which causes beacon packets to be filtered out and disconnection. Therefore, we fix it. Fixes: e3037485 ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231103020851.102238-1-pkshih@realtek.com
-
Dmitry Antipov authored
Since 'ieee80211_txq_get_depth()' allows NULL for 2nd and 3rd arguments, simplify '__rtw_tx_work()' by dropping unused 'byte_cnt'. Compile tested only. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231102115606.69838-1-dmantipov@yandex.ru
-
Ping-Ke Shih authored
To notify firmware TDMA timeslot assignment, append TDMA parameters when sending policy H2C firmware command. However, compiler warns we do memcpy() data to val[] field of TLV struct. To avoid this, assign the struct value with simple '=' instead. Compile tested only. rtw89/coex.c: In function '_append_tdma': drivers/net/wireless/realtek/rtw89/coex.c:1585:17: warning: writing 8 bytes into a region of size 0 [-Wstringop-overflow=] 1585 | memcpy(&v3->tdma, &dm->tdma, sizeof(v3->tdma)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/net/wireless/realtek/rtw89/coex.h:8, from drivers/net/wireless/realtek/rtw89/coex.c:5: drivers/net/wireless/realtek/rtw89/core.h:2703:37: note: at offset [5714, 71249] into destination object 'ver' of size 8 2703 | const struct rtw89_btc_ver *ver; | ^~~ drivers/net/wireless/realtek/rtw89/coex.c:1579:17: warning: writing 8 bytes into a region of size 0 [-Wstringop-overflow=] 1579 | memcpy(v, &dm->tdma, sizeof(*v)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/realtek/rtw89/core.h:2703:37: note: at offset [5710, 71245] into destination object 'ver' of size 8 2703 | const struct rtw89_btc_ver *ver; | ^~~ Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202310301908.Wrj0diqe-lkp@intel.com/Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231102003716.25815-1-pkshih@realtek.com
-
Ping-Ke Shih authored
For normal use, we do additional settings than mac_pre_init, such as more TX/RX DMA channels, interrupt mitigation and etc. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231101072149.21997-6-pkshih@realtek.com
-
Ping-Ke Shih authored
PCI LTR (Latency Tolerance Reporting) is a capability to yield expected power consumption, and we configure the parameters according to design. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231101072149.21997-5-pkshih@realtek.com
-
Ping-Ke Shih authored
Call this function when doing MAC initialization at probe stage. It does partial initial registers only, because we only need basic ability to download firmware. The function to clear index is the sub-function, so set its pointer as well. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231101072149.21997-4-pkshih@realtek.com
-
Ping-Ke Shih authored
Use gen_def pointer to call three WiFi 6 specific functions, and add _ax suffix to them. Then, we will implement functions for WiFi 7 chips later. The mac_{pre,post}_init are used to initialize PCI during doing MAC initialization, and clear PCI ring index to make index consistent between driver, firmware and hardware. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231101072149.21997-3-pkshih@realtek.com
-
Ping-Ke Shih authored
In order to reuse PCI initial and configuration flows, add struct rtw89_pci_gen_def to abstract the differences between WiFi 6/7 generations. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231101072149.21997-2-pkshih@realtek.com
-
Dmitry Antipov authored
Simplify 'wilc_scan()' assuming 'struct wilc_priv *' is the only data passed to '(*scan_result)()' callback and thus avoid typeless 'void *' pointers in related code, including 'struct wilc_user_scan_req'. Compile tested only. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231031171330.70399-2-dmantipov@yandex.ru
-
Dmitry Antipov authored
Remove set but otherwise unused 'ch' member of 'struct wilc_conn_info' and avoid typeless 'void *' pointers in '(*conn_result)()' callback. Likewise for 'wilc_parse_join_bss_param()'. Compile tested only. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231031171330.70399-1-dmantipov@yandex.ru
-
Dan Carpenter authored
Check for if the usb_alloc_urb() failed. Fixes: 68d57a07 ("wireless: add plfxlc driver for pureLiFi X, XL, XC devices") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/e8d4a19a-f251-4101-a89b-607345e938cb@moroto.mountain
-
- 30 Oct, 2023 13 commits
-
-
Arnd Bergmann authored
Wireless RNDIS USB is a new-style CFG80211 driver for 802.11b and 802.11g USB hardware from around 2004 to 2006. This makes it more modern than any of the others, but Kalle already classified it as "legacy" in commit 298e50ad ("wifi: move raycs, wl3501 and rndis_wlan to legacy directory"). Jussi Kivilinna worked on this driver between 2008 and 2012, and it has only seen cosmetic updates after that. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@kernel.org>
-
Arnd Bergmann authored
Planet WL3501 is another PCMCIA driver for pre-802.11b interfaces (2Mbit/s) with incomplete CFG80211 support. This was marked as orphaned in 2017 but has been unmaintained for a long time before that. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@kernel.org>
-
Arnd Bergmann authored
Aviator/Raytheon is an early PCMCIA driver, apparently predating 802.11b and only supporting wireless extensions. The driver has been orphaned since 2010 and only seen cosmetic updates long before than. Jean Tourrilhes pointed out in a 2005 changelog that he tested a change on actual hardware, which was apparently already noteworthy back then. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@kernel.org>
-
Arnd Bergmann authored
Orinoco is a PIO-only ISA/PCMCIA 802.11b device with extra bus interface connections for PCI/Cardbus/mini-PCI and a few pre-2002 Apple PowerMac variants. It supports both wireless extensions and CFG80211, but I could not tell if it requires using both. This device used to be one of the most common ones 20 years ago, but has been orphaned for most of the time since then, and the conversion to cfg80211 has stalled in 2010. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@kernel.org>
-
Arnd Bergmann authored
This is a wireless extensions style driver for 802.11b USB dongles, with partial support for cfg80211 interfaces. As these are all external dongles, there are probably few users that have not yet replaced them with cheap 802.11n devices that work better. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@kernel.org>
-
Arnd Bergmann authored
HostAP is an ISA/PCMCIA style 802.11b driver supporting only wireless extensions, and some custom ioctls (already removed). Some devices include a legacy PCI bridge but no DMA. The driver was marked obsolete in 2016 and is highly unlikely to still have any users. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@kernel.org>
-
Arnd Bergmann authored
Cisco Aironet is an 802.11b PCMCIA and mini-PCI with limited support for Cardbus DMA and for CFG80211. Both PCMCIA and WEXT are deprecated, and there is little chance that anyone is still using this driver, so remove it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@kernel.org>
-
Arnd Bergmann authored
Atmel at76c502/at76c504/at76c506 is a PIO-only (PCMCIA, mini-PCI and Cardbus) 802.11b driver with incomplete CFG80211 support. Both PCMCIA and WEXT are deprecated, and there is little chance that anyone is still using this driver, so remove it. The related at76c50x USB driver uses MAC80211 and remains. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@kernel.org>
-
Arnd Bergmann authored
With all the other PCMCIA WLAN adapters gone from the kernel, this is now the last remaining device with this interface, but as far as I can tell, all the actual libertas users were actually using either SDIO or USB. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@kernel.org>
-
Ping-Ke Shih authored
PHY status IEs is used to have more information about received packets, such as RSSI and EVM. For each PHY IE type, it has different predefined PHY IE length, and the length are changed, so add them for WiFi 7 chips accordingly. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231027015059.10032-5-pkshih@realtek.com
-
Ping-Ke Shih authored
For WiFi 7 chips, some fields and predefined length are changed, so add them accordingly. The mac_id field is used to identify peer that send a packet, and we can use it to know RSSI and traffic from the peer. For WiFi 7 chips, RXWD.mac_id of PPDU status packet is not set by hardware. Instead, we should fill it by rxinfo_user[].mac_id of PPDU status content. Also, filter out invalid reports to prevent warning messages keep showing. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231027015059.10032-4-pkshih@realtek.com
-
Zong-Zhe Yang authored
Different chip can support different max user in one PPDU report. So, we now configure it in chip info. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231027015059.10032-3-pkshih@realtek.com
-
Ping-Ke Shih authored
The new chips change hardware design to shrink entry size of address CAM from 0x40 to 0x20, so make this change accordingly. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231027015059.10032-2-pkshih@realtek.com
-