[openwrt/openwrt] mac80211: add support for MLD AP client probing

LEDE Commits lede-commits at lists.infradead.org
Thu Aug 28 13:09:44 PDT 2025


nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a04b5fdcb6e553282911bf4d43fff5dc72bc423c

commit a04b5fdcb6e553282911bf4d43fff5dc72bc423c
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Aug 28 14:48:42 2025 +0200

    mac80211: add support for MLD AP client probing
    
    Select a link for outgoing probe packets
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...11-add-MLO-support-to-ieee80211_probe_cli.patch | 64 ++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/package/kernel/mac80211/patches/subsys/370-wifi-mac80211-add-MLO-support-to-ieee80211_probe_cli.patch b/package/kernel/mac80211/patches/subsys/370-wifi-mac80211-add-MLO-support-to-ieee80211_probe_cli.patch
new file mode 100644
index 0000000000..1f9d6a104b
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/370-wifi-mac80211-add-MLO-support-to-ieee80211_probe_cli.patch
@@ -0,0 +1,64 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Thu, 28 Aug 2025 14:41:57 +0200
+Subject: [PATCH] wifi: mac80211: add MLO support to ieee80211_probe_client
+
+Use the first available link to probe the client.
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -4320,7 +4320,9 @@ static int ieee80211_probe_client(struct
+ 	struct ieee80211_tx_info *info;
+ 	struct sta_info *sta;
+ 	struct ieee80211_chanctx_conf *chanctx_conf;
++	struct ieee80211_bss_conf *link_conf;
+ 	enum nl80211_band band;
++	u8 link_id;
+ 	int ret;
+ 
+ 	/* the lock is needed to assign the cookie later */
+@@ -4335,7 +4337,23 @@ static int ieee80211_probe_client(struct
+ 
+ 	qos = sta->sta.wme;
+ 
+-	chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
++	if (ieee80211_vif_is_mld(&sdata->vif)) {
++		if (sta->sta.valid_links)
++			link_id = ffs(sta->sta.valid_links) - 1;
++		else
++			link_id = sta->deflink.link_id;
++
++		link_conf = rcu_dereference(sdata->vif.link_conf[link_id]);
++		if (unlikely(!link_conf)) {
++			ret = -ENOLINK;
++			goto unlock;
++		}
++	} else {
++		link_id = IEEE80211_LINK_UNSPECIFIED;
++		link_conf = &sdata->vif.bss_conf;
++	}
++
++	chanctx_conf = rcu_dereference(link_conf->chanctx_conf);
+ 	if (WARN_ON(!chanctx_conf)) {
+ 		ret = -EINVAL;
+ 		goto unlock;
+@@ -4367,14 +4385,15 @@ static int ieee80211_probe_client(struct
+ 	nullfunc->frame_control = fc;
+ 	nullfunc->duration_id = 0;
+ 	memcpy(nullfunc->addr1, sta->sta.addr, ETH_ALEN);
+-	memcpy(nullfunc->addr2, sdata->vif.addr, ETH_ALEN);
+-	memcpy(nullfunc->addr3, sdata->vif.addr, ETH_ALEN);
++	memcpy(nullfunc->addr2, link_conf->addr, ETH_ALEN);
++	memcpy(nullfunc->addr3, link_conf->addr, ETH_ALEN);
+ 	nullfunc->seq_ctrl = 0;
+ 
+ 	info = IEEE80211_SKB_CB(skb);
+ 
+ 	info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS |
+ 		       IEEE80211_TX_INTFL_NL80211_FRAME_TX;
++	info->control.flags |= u32_encode_bits(link_id, IEEE80211_TX_CTRL_MLO_LINK);
+ 	info->band = band;
+ 
+ 	skb_set_queue_mapping(skb, IEEE80211_AC_VO);




More information about the lede-commits mailing list