]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: cfg80211: include s1g_primary_2mhz when sending chandef
authorLachlan Hodges <lachlan.hodges@morsemicro.com>
Tue, 25 Nov 2025 02:59:25 +0000 (13:59 +1100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 25 Nov 2025 09:31:11 +0000 (10:31 +0100)
The chandef now includes a flag denoting the use of a 2MHz primary
channel for S1G interfaces, include this when sending the chandef.

Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com>
Link: https://patch.msgid.link/20251125025927.245280-2-lachlan.hodges@morsemicro.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c

index 29c92bc8291bd5d24ab7751566421f8377bdb79a..c961cd42a8325b84e09879aad13a88d4cb07255d 100644 (file)
@@ -4178,6 +4178,9 @@ int nl80211_send_chandef(struct sk_buff *msg, const struct cfg80211_chan_def *ch
        if (chandef->punctured &&
            nla_put_u32(msg, NL80211_ATTR_PUNCT_BITMAP, chandef->punctured))
                return -ENOBUFS;
+       if (chandef->s1g_primary_2mhz &&
+           nla_put_flag(msg, NL80211_ATTR_S1G_PRIMARY_2MHZ))
+               return -ENOBUFS;
 
        return 0;
 }