diff mbox series

wifi: rtl8xxxu: Perform update_beacon_work when beaconing is enabled

Message ID 20240930084955.455241-1-martin.kaistra@linutronix.de (mailing list archive)
State Accepted
Delegated to: Ping-Ke Shih
Headers show
Series wifi: rtl8xxxu: Perform update_beacon_work when beaconing is enabled | expand

Commit Message

Martin Kaistra Sept. 30, 2024, 8:49 a.m. UTC
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 <martin.kaistra@linutronix.de>
---
 drivers/net/wireless/realtek/rtl8xxxu/core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Ping-Ke Shih Oct. 5, 2024, 2:59 a.m. UTC | #1
Martin Kaistra <martin.kaistra@linutronix.de> wrote:

> 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 <martin.kaistra@linutronix.de>

1 patch(es) applied to rtw-next branch of rtw.git, thanks.

d7063ed6758c wifi: rtl8xxxu: Perform update_beacon_work when beaconing is enabled

---
https://github.com/pkshih/rtw.git
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/core.c b/drivers/net/wireless/realtek/rtl8xxxu/core.c
index 7891c988dd5f0..f95898f68d68a 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/core.c
+++ b/drivers/net/wireless/realtek/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_delayed_work(&priv->update_beacon_work, 0);
+		} else {
 			rtl8xxxu_stop_tx_beacon(priv);
+		}
 	}
 
 	if (changed & BSS_CHANGED_BEACON)