rtw89: only STA mode change vif_type mapping dynamically

vif_type mapping indicates hardware operating mode corresponding to vif
type. In STA mode, hardware mode should be INFRA or NO_LINK mode
dynamically according to association status. Since AP mode don't need to
change this by association status intuitively, just do the mapping in
STA mode.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220207063900.43643-4-pkshih@realtek.com
This commit is contained in:
Ping-Ke Shih
2022-02-07 14:38:56 +08:00
committed by Kalle Valo
parent 2ab856cc3a
commit fd7ee4c8ac
2 changed files with 5 additions and 2 deletions

View File

@@ -2047,7 +2047,8 @@ int rtw89_core_sta_disconnect(struct rtw89_dev *rtwdev,
rtw89_mac_bf_disassoc(rtwdev, vif, sta);
rtw89_core_free_sta_pending_ba(rtwdev, sta);
rtw89_vif_type_mapping(vif, false);
if (vif->type == NL80211_IFTYPE_STATION)
rtw89_vif_type_mapping(vif, false);
ret = rtw89_fw_h2c_assoc_cmac_tbl(rtwdev, vif, sta);
if (ret) {
@@ -2079,7 +2080,6 @@ int rtw89_core_sta_assoc(struct rtw89_dev *rtwdev,
struct rtw89_sta *rtwsta = (struct rtw89_sta *)sta->drv_priv;
int ret;
rtw89_vif_type_mapping(vif, true);
ret = rtw89_fw_h2c_assoc_cmac_tbl(rtwdev, vif, sta);
if (ret) {