Message ID | 20230516082441.11154-2-pkshih@realtek.com (mailing list archive) |
---|---|
State | Accepted |
Commit | cda66049bab5273c61f09a4ea8c09d1de4d64fc0 |
Delegated to: | Kalle Valo |
Headers | show |
Series | wifi: rtw89: correct ieee80211_restart_hw() flow caused by SER L2 event | expand |
Ping-Ke Shih <pkshih@realtek.com> wrote: > From: Zong-Zhe Yang <kevin_yang@realtek.com> > > 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> 3 patches applied to wireless-next.git, thanks. cda66049bab5 wifi: rtw89: ser: reset total_sta_assoc and tdls_peer when L2 b79a84fbbdb0 wifi: rtw89: tweak H2C TX waiting function for SER 8b21c08ef7df wifi: rtw89: refine packet offload handling under SER
diff --git a/drivers/net/wireless/realtek/rtw89/ser.c b/drivers/net/wireless/realtek/rtw89/ser.c index 9ba99f3764e7e..54b314b8b3292 100644 --- a/drivers/net/wireless/realtek/rtw89/ser.c +++ b/drivers/net/wireless/realtek/rtw89/ser.c @@ -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 */