1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/wireless/ti/wlcore
Russell King (Oracle) 14f89946b6 wifi: wlcore: fix wlcore AP mode
Using wl183x devices in AP mode with various firmwares is not stable.

The driver currently adds a station to firmware with basic rates when it
is first known to the stack using the CMD_ADD_PEER command. Once the
station has finished authorising, another CMD_ADD_PEER command is issued
to update the firmware with the rates the station can use.

However, after a random amount of time, the firmware ignores the power
management nullfunc frames from the station, and tries to send packets
while the station is asleep, resulting in lots of retries dropping down
in rate due to no response. This restricts the available bandwidth.

With this happening with several stations, the user visible effect is
the latency of interactive connections increases significantly, packets
get dropped, and in general the WiFi connections become unreliable and
unstable.

Eventually, the firmware transmit queue appears to get stuck - with
packets and blocks allocated that never clear.

TI have a couple of patches that address this, but they touch the
mac80211 core to disable NL80211_FEATURE_FULL_AP_CLIENT_STATE for *all*
wireless drivers, which has the effect of not adding the station to the
stack until later when the rates are known. This is a sledge hammer
approach to solving the problem.

The solution implemented here has the same effect, but without
impacting all drivers.

We delay adding the station to firmware until it has been authorised
in the driver, and correspondingly remove the station when unwinding
from authorised state. Adding the station to firmware allocates a hlid,
which will now happen later than the driver expects. Therefore, we need
to track when this happens so that we transmit using the correct hlid.

This patch is an equivalent fix to these two patches in TI's
wilink8-wlan repository:

https://git.ti.com/cgit/wilink8-wlan/build-utilites/tree/patches/kernel_patches/4.19.38/0004-mac80211-patch.patch?h=r8.9&id=a2ee50aa5190ed3b334373d6cd09b1bff56ffcf7
https://git.ti.com/cgit/wilink8-wlan/build-utilites/tree/patches/kernel_patches/4.19.38/0005-wlcore-patch.patch?h=r8.9&id=a2ee50aa5190ed3b334373d6cd09b1bff56ffcf7

Reported-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Co-developed-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/E1sClp4-00Evu7-8v@rmk-PC.armlinux.org.uk
2024-06-18 12:16:57 +03:00
..
acx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
acx.h wireless: ti: Replace zero-length array with flexible-array member 2020-03-23 18:55:04 +02:00
boot.c wifi: wlcore: boot: replace deprecated strncpy with strscpy 2023-10-23 20:29:15 +03:00
boot.h wireless: ti: Replace zero-length array with flexible-array member 2020-03-23 18:55:04 +02:00
cmd.c wifi: wlcore: fix wlcore AP mode 2024-06-18 12:16:57 +03:00
cmd.h wifi: ti: Avoid a hundred -Wflex-array-member-not-at-end warnings 2024-03-28 15:07:37 +02:00
conf.h wireless: ti: Replace zero-length array with flexible-array member 2020-03-23 18:55:04 +02:00
debug.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
debugfs.c wlcore: debugfs: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() 2022-04-12 16:53:29 +03:00
debugfs.h wlcore: Fix buffer overrun by snprintf due to incorrect buffer size 2021-04-22 17:39:29 +03:00
event.c wifi: mac80211: add support to call csa_finish on a link 2024-02-08 15:00:45 +01:00
event.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
hw_ops.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
ini.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
init.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
init.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
io.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
io.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
main.c wifi: wlcore: fix wlcore AP mode 2024-06-18 12:16:57 +03:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ps.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
ps.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
rx.c timekeeping: Use proper clock specifier names in functions 2019-06-22 12:11:27 +02:00
rx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
scan.c wl12xx: scan: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() 2022-04-23 15:46:13 +03:00
scan.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
sdio.c wifi: wlcore: sdio: Rate limit wl12xx_sdio_raw_{read,write}() failures warns 2024-03-05 20:53:46 +02:00
spi.c wifi: fill in MODULE_DESCRIPTION()s for wlcore 2024-01-31 18:32:31 +02:00
sysfs.c wifi: ti: Convert sprintf/snprintf to sysfs_emit 2024-03-21 17:07:54 +02:00
sysfs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
testmode.c wlcore: testmode: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() 2022-04-23 10:11:34 +03:00
testmode.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
tx.c wifi: wlcore: fix wlcore AP mode 2024-06-18 12:16:57 +03:00
tx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
vendor_cmd.c wlcore: vendor_cmd: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() 2022-04-23 10:11:58 +03:00
vendor_cmd.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
wl12xx_80211.h wifi: ti: Avoid a hundred -Wflex-array-member-not-at-end warnings 2024-03-28 15:07:37 +02:00
wlcore.h wifi: wlcore: Convert to platform remove callback returning void 2023-09-18 17:31:37 +03:00
wlcore_i.h wifi: wlcore: fix wlcore AP mode 2024-06-18 12:16:57 +03:00