From 7e34bf03c5de31c212ee8ac8bc993fb73805ac8e Mon Sep 17 00:00:00 2001 From: Martin Kaistra Date: Tue, 11 Mar 2025 08:51:19 +0900 Subject: [PATCH] wifi: rtl8xxxu: Perform update_beacon_work when beaconing is enabled BugLink: https://bugs.launchpad.net/bugs/2101915 [ Upstream commit d7063ed6758c62e00a2f56467ded85a021fac67a ] In STA+AP concurrent mode, performing a scan operation on one vif temporarily stops beacons on the other. When the scan is completed, beacons are enabled again with BSS_CHANGED_BEACON_ENABLED. We can observe that no beacons are being sent when just rtl8xxxu_start_tx_beacon() is being called. Thus, also perform update_beacon_work in order to restore beaconing. Fixes: cde8848cad0b ("wifi: rtl8xxxu: Add beacon functions") Signed-off-by: Martin Kaistra Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240930084955.455241-1-martin.kaistra@linutronix.de Signed-off-by: Sasha Levin [koichiroden: applied to rtl8xxxu_core.c instead of core.c due to missing commit: 028fa281712d ("wifi: rtl8xxxu: remove rtl8xxxu_ prefix from filenames") and adjusted patch due to missing commit: ece90a862232 ("wifi: rtl8xxxu: enable channel switch support")] Signed-off-by: Koichiro Den Signed-off-by: Stefan Bader --- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c index 5a16cf000f1d..c19d739db375 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -5058,10 +5058,12 @@ rtl8xxxu_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, } if (changed & BSS_CHANGED_BEACON_ENABLED) { - if (bss_conf->enable_beacon) + if (bss_conf->enable_beacon) { rtl8xxxu_start_tx_beacon(priv); - else + schedule_work(&priv->update_beacon_work); + } else { rtl8xxxu_stop_tx_beacon(priv); + } } if (changed & BSS_CHANGED_BEACON)