summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtw88/mac80211.c
diff options
context:
space:
mode:
authorPo-Hao Huang <phhuang@realtek.com>2023-04-14 20:13:23 +0800
committerKalle Valo <kvalo@kernel.org>2023-04-20 15:33:47 +0300
commit96fbb84de4ffce76d54de8656efe0a580081c037 (patch)
treefacb7f6392941a5e90a802689fb69f55cfb3d020 /drivers/net/wireless/realtek/rtw88/mac80211.c
parenta1b8015da57a783b3ceebd8e114afbe07536bd54 (diff)
wifi: rtw88: handle station mode concurrent scan with AP mode
This patch allows vifs sharing same hardware with the AP mode vif to do scan, do note that this could lead to packet loss or disconnection of the AP's clients. Since we don't have chanctx, update scan info upon set channel so bandwidth changes won't go unnoticed and get misconfigured after scan. Download beacon just before scan starts to allow hardware to get proper content to do beaconing. Last, beacons should only be transmitted in AP's operating channel. Turn related beacon functions off while we're in other channels so the receiving stations won't get confused. Signed-off-by: Po-Hao Huang <phhuang@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/20230414121323.18008-1-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88/mac80211.c')
-rw-r--r--drivers/net/wireless/realtek/rtw88/mac80211.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c
index b3e4c699d425..7aa6edad0d01 100644
--- a/drivers/net/wireless/realtek/rtw88/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw88/mac80211.c
@@ -404,7 +404,7 @@ static void rtw_ops_bss_info_changed(struct ieee80211_hw *hw,
if (changed & BSS_CHANGED_BSSID) {
ether_addr_copy(rtwvif->bssid, conf->bssid);
config |= PORT_SET_BSSID;
- if (is_zero_ether_addr(rtwvif->bssid))
+ if (!rtw_core_check_sta_active(rtwdev))
rtw_clear_op_chan(rtwdev);
else
rtw_store_op_chan(rtwdev, true);
@@ -452,6 +452,7 @@ static int rtw_ops_start_ap(struct ieee80211_hw *hw,
mutex_lock(&rtwdev->mutex);
rtwdev->ap_active = true;
+ rtw_store_op_chan(rtwdev, true);
chip->ops->phy_calibration(rtwdev);
mutex_unlock(&rtwdev->mutex);
@@ -466,6 +467,8 @@ static void rtw_ops_stop_ap(struct ieee80211_hw *hw,
mutex_lock(&rtwdev->mutex);
rtwdev->ap_active = false;
+ if (!rtw_core_check_sta_active(rtwdev))
+ rtw_clear_op_chan(rtwdev);
mutex_unlock(&rtwdev->mutex);
}