wifi: ath11k: reset ar->num_stations on hardware start
PATCH v3 1/1 wifi: ath11k: reset ar->num_stations on hardware start
When (multiple) hw restart occurs, we end up in a situation where we cannot accept new stations / mesh peers. This seems to be the 'num_stations' in 'struct ath11k' that did not get reset properly in this case. In ath11k_mac_op_start(), it was indeed the only accounting var that did not get reset so let's clear it too.
This avoids problems like those:
[1248828.088023] WARNING: CPU: 0 PID: 12281 at net/mac80211/util.c:1682 ieee80211_reconfig_stations+0x98/0xc0 [1248828.088115] Call trace: [1248828.088116] ieee80211_reconfig_stations+0x98/0xc0 (P) [1248828.088119] ieee80211_reconfig+0x774/0x1438 [1248828.088123] ieee80211_restart_work+0x10c/0x178 [1248828.088127] process_one_work+0x178/0x3c0 [1248828.088130] worker_thread+0x280/0x440 [1248828.088133] kthread+0xe0/0xf8 [1248828.088137] ret_from_fork+0x10/0x20 [1248828.088141] ---[ end trace 0000000000000000 ]--- [1248836.686604] ath11k_pci 0000:04:00.0: refusing to associate station: too many connected already (128) [1248836.686609] ath11k_pci 0000:04:00.0: Failed to add station: xx:xx:xx:xx:xx:xx for VDEV: 1
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.9.0.1-01977-QCAHKSWPL_SILICONZ-1
---
Changes in v3:
- Fixed message typos
- Trimmed stacktrace
- Added hardware revision to Tested-on
- Link to v2: https://patch.msgid.link/[email protected]
Changes in v2
- rebased on ath/master
- no code change
- Link to v1: https://patch.msgid.link/[email protected]
--- drivers/net/wireless/ath/ath11k/mac.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/ath11k/mac.c +1 -0
@@ -6699,6 +6699,7 @@ static int ath11k_mac_op_start(struct ieee80211_hw *hw) ar->num_started_vdevs =0 ; ar->num_created_vdevs =0 ; ar->num_peers =0 ; + ar->num_stations =0 ; ar->allocated_vdev_map =0 ;/* Configure monitor status ring with default rx_filter to get rx status
---
base-commit: e07447e654476262558bee570f4cf456e2b32565
change-id: 20260812-num-station-d33483331299
Best regards,
Signature · 1 line
Nicolas Escande <[email protected]>
Quoted 21 lines · Nicolas Escande
When (multiple) hw restart occurs, we end up in a situation where we cannot accept new stations / mesh peers. This seems to be the '
num_stations' in 'struct ath11k' that did not get reset properly in this case. Inath11k_mac_op_start(), it was indeed the only accounting var that did not get reset so let's clear it too.This avoids problems like those:
[1248828.088023] WARNING: CPU: 0 PID: 12281 at net/mac80211/util.c:1682 ieee80211_reconfig_stations+0x98/0xc0 [1248828.088115] Call trace: [1248828.088116] ieee80211_reconfig_stations+0x98/0xc0 (P) [1248828.088119] ieee80211_reconfig+0x774/0x1438 [1248828.088123] ieee80211_restart_work+0x10c/0x178 [1248828.088127] process_one_work+0x178/0x3c0 [1248828.088130] worker_thread+0x280/0x440 [1248828.088133] kthread+0xe0/0xf8 [1248828.088137] ret_from_fork+0x10/0x20 [1248828.088141] ---[ end trace 0000000000000000 ]--- [1248836.686604] ath11k_pci 0000:04:00.0: refusing to associate station: too many connected already (128) [1248836.686609] ath11k_pci 0000:04:00.0: Failed to add station: xx:xx:xx:xx:xx:xx for VDEV: 1
Quoted 4 lines
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.9.0.1-01977-QCAHKSWPL_SILICONZ-1
Fixes d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")Signed-off-by Nicolas Escande <[email protected]>
Quoted 21 lines · Nicolas Escande
When (multiple) hw restart occurs, we end up in a situation where we cannot accept new stations / mesh peers. This seems to be the '
num_stations' in 'struct ath11k' that did not get reset properly in this case. Inath11k_mac_op_start(), it was indeed the only accounting var that did not get reset so let's clear it too.This avoids problems like those:
[1248828.088023] WARNING: CPU: 0 PID: 12281 at net/mac80211/util.c:1682 ieee80211_reconfig_stations+0x98/0xc0 [1248828.088115] Call trace: [1248828.088116] ieee80211_reconfig_stations+0x98/0xc0 (P) [1248828.088119] ieee80211_reconfig+0x774/0x1438 [1248828.088123] ieee80211_restart_work+0x10c/0x178 [1248828.088127] process_one_work+0x178/0x3c0 [1248828.088130] worker_thread+0x280/0x440 [1248828.088133] kthread+0xe0/0xf8 [1248828.088137] ret_from_fork+0x10/0x20 [1248828.088141] ---[ end trace 0000000000000000 ]--- [1248836.686604] ath11k_pci 0000:04:00.0: refusing to associate station: too many connected already (128) [1248836.686609] ath11k_pci 0000:04:00.0: Failed to add station: xx:xx:xx:xx:xx:xx for VDEV: 1
Quoted 4 lines
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.9.0.1-01977-QCAHKSWPL_SILICONZ-1
Fixes d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")Signed-off-by Nicolas Escande <[email protected]>
Jeff Johnson
AppliedQuoted 9 lines · Nicolas Escande
When (multiple) hw restart occurs, we end up in a situation where we cannot accept new stations / mesh peers. This seems to be the '
num_stations' in 'struct ath11k' that did not get reset properly in this case. Inath11k_mac_op_start(), it was indeed the only accounting var that did not get reset so let's clear it too.This avoids problems like those:
[...]
Applied, thanks!
[1/1] wifi: ath11k: reset ar->num_stations on hardware start
commit: 7e0ad05ebc72fffba2bdf2400400902d94ed7272
Best regards,
Signature · 1 line
Jeff Johnson <[email protected]>