]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mac80211: explain ieee80211_determine_chan_mode() parsing
authorJohannes Berg <johannes.berg@intel.com>
Fri, 29 May 2026 08:25:03 +0000 (10:25 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 3 Jun 2026 12:11:58 +0000 (14:11 +0200)
Looking through element parsing behaviour for multi-BSSID
and multi-link, this one seemed odd. Add a comment that
explains why it's written this way.

Link: https://patch.msgid.link/20260529102644.25f75c4df338.I1f1f17cc0ae8e413659654d4bbaa34260ef68e2c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c

index 2b7bb371efee1f0d3a47b89f5a0e2fe9babd279f..3553e39a7db4d96759d402c056b87abdc04e100d 100644 (file)
@@ -1077,6 +1077,14 @@ ieee80211_determine_chan_mode(struct ieee80211_sub_if_data *sdata,
        const struct cfg80211_bss_ies *ies = rcu_dereference(cbss->ies);
        struct ieee80211_bss *bss = (void *)cbss->priv;
        struct ieee80211_channel *channel = cbss->channel;
+       /*
+        * This is for parsing a beacon or probe response here, but it's
+        * using the *BSS* elements which are synthetic for multi-BSSID,
+        * created by cfg80211 based on multi-BSSID inheritance etc. As
+        * a result, this sets neither .bss (since multi-BSSID is parsed
+        * already) nor a valid .link_id (since it doesn't want to see
+        * the data from another link.)
+        */
        struct ieee80211_elems_parse_params parse_params = {
                .link_id = -1,
                .from_ap = true,