wifi: rtw89: ser: reset total_sta_assoc and tdls_peer when L2
authorZong-Zhe Yang <kevin_yang@realtek.com>
Tue, 16 May 2023 08:24:39 +0000 (16:24 +0800)
committerKalle Valo <kvalo@kernel.org>
Thu, 25 May 2023 16:10:58 +0000 (19:10 +0300)
commitcda66049bab5273c61f09a4ea8c09d1de4d64fc0
tree9a6ca3c3b52938b2591661af41896f37ab4eec7c
parenta3b125ceb45e1acd21c9bcb6d3a5c52897d536e6
wifi: rtw89: ser: reset total_sta_assoc and tdls_peer when L2

The total_sta_assoc and the tdls_peer are used for statistics accodring
to stations' information. L2 (Level 2) SER (system error recovery) will
call ieee80211_restart_hw() which re-invokes sta_state ops. And then,
the total_sta_assoc and tdls_peer will be re-increased. In case wrong
statistics results, we reset them in SER L2 handling.

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/20230516082441.11154-2-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/ser.c