mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-10-01 02:41:09 +00:00
86 lines
2.6 KiB
Diff
86 lines
2.6 KiB
Diff
From: Maharaja Kennadyrajan <maharaja.kennadyrajan@oss.qualcomm.com>
|
|
Date: Fri, 18 Jul 2025 11:38:36 +0530
|
|
Subject: [PATCH] wifi: mac80211: extend beacon monitoring for MLO
|
|
|
|
Currently, reset beacon monitor (ieee80211_sta_reset_beacon_monitor())
|
|
timer is handled only for non-AP non-MLD STA and do not support non-AP MLD
|
|
STA. When the beacon loss occurs in non-AP MLD STA with the current
|
|
implementation, it is treated as a single link and the timer will reset
|
|
based on the timeout of the deflink, without checking all the links.
|
|
|
|
Check the CSA flags for all the links in the MLO and decide whether to
|
|
schedule the work queue for beacon loss. If any of the links has CSA
|
|
active, then beacon loss work is not scheduled.
|
|
|
|
Also, call the functions ieee80211_sta_reset_beacon_monitor() and
|
|
ieee80211_sta_reset_conn_monitor() from ieee80211_csa_switch_work() only
|
|
when all the links are CSA active.
|
|
|
|
Signed-off-by: Maharaja Kennadyrajan <maharaja.kennadyrajan@oss.qualcomm.com>
|
|
Link: https://patch.msgid.link/20250718060837.59371-4-maharaja.kennadyrajan@oss.qualcomm.com
|
|
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
---
|
|
|
|
--- a/net/mac80211/mlme.c
|
|
+++ b/net/mac80211/mlme.c
|
|
@@ -2439,6 +2439,21 @@ static void ieee80211_csa_switch_work(st
|
|
}
|
|
}
|
|
|
|
+ /*
|
|
+ * It is not necessary to reset these timers if any link does not
|
|
+ * have an active CSA and that link still receives the beacons
|
|
+ * when other links have active CSA.
|
|
+ */
|
|
+ for_each_link_data(sdata, link) {
|
|
+ if (!link->conf->csa_active)
|
|
+ return;
|
|
+ }
|
|
+
|
|
+ /*
|
|
+ * Reset the beacon monitor and connection monitor timers when CSA
|
|
+ * is active for all links in MLO when channel switch occurs in all
|
|
+ * the links.
|
|
+ */
|
|
ieee80211_sta_reset_beacon_monitor(sdata);
|
|
ieee80211_sta_reset_conn_monitor(sdata);
|
|
}
|
|
@@ -8389,16 +8404,32 @@ void ieee80211_sta_work(struct ieee80211
|
|
}
|
|
}
|
|
|
|
+static bool
|
|
+ieee80211_is_csa_in_progress(struct ieee80211_sub_if_data *sdata)
|
|
+{
|
|
+ /*
|
|
+ * In MLO, check the CSA flags 'active' and 'waiting_bcn' for all
|
|
+ * the links.
|
|
+ */
|
|
+ struct ieee80211_link_data *link;
|
|
+
|
|
+ guard(rcu)();
|
|
+
|
|
+ for_each_link_data_rcu(sdata, link) {
|
|
+ if (!(link->conf->csa_active &&
|
|
+ !link->u.mgd.csa.waiting_bcn))
|
|
+ return false;
|
|
+ }
|
|
+
|
|
+ return true;
|
|
+}
|
|
+
|
|
static void ieee80211_sta_bcn_mon_timer(struct timer_list *t)
|
|
{
|
|
struct ieee80211_sub_if_data *sdata =
|
|
timer_container_of(sdata, t, u.mgd.bcn_mon_timer);
|
|
|
|
- if (WARN_ON(ieee80211_vif_is_mld(&sdata->vif)))
|
|
- return;
|
|
-
|
|
- if (sdata->vif.bss_conf.csa_active &&
|
|
- !sdata->deflink.u.mgd.csa.waiting_bcn)
|
|
+ if (ieee80211_is_csa_in_progress(sdata))
|
|
return;
|
|
|
|
if (sdata->vif.driver_flags & IEEE80211_VIF_BEACON_FILTER)
|