mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-13 12:59:33 -04:00
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
This commit is contained in:
committed by
Kalle Valo
parent
a3b125ceb4
commit
cda66049ba
@@ -303,6 +303,7 @@ static void ser_reset_vif(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif)
|
||||
rtw89_core_release_bit_map(rtwdev->hw_port, rtwvif->port);
|
||||
rtwvif->net_type = RTW89_NET_TYPE_NO_LINK;
|
||||
rtwvif->trigger = false;
|
||||
rtwvif->tdls_peer = 0;
|
||||
}
|
||||
|
||||
static void ser_sta_deinit_cam_iter(void *data, struct ieee80211_sta *sta)
|
||||
@@ -341,6 +342,8 @@ static void ser_reset_mac_binding(struct rtw89_dev *rtwdev)
|
||||
rtw89_core_release_all_bits_map(rtwdev->mac_id_map, RTW89_MAX_MAC_ID_NUM);
|
||||
rtw89_for_each_rtwvif(rtwdev, rtwvif)
|
||||
ser_reset_vif(rtwdev, rtwvif);
|
||||
|
||||
rtwdev->total_sta_assoc = 0;
|
||||
}
|
||||
|
||||
/* hal function */
|
||||
|
||||
Reference in New Issue
Block a user