wifi: cfg80211: include s1g_primary_2mhz when sending chandef

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>
This commit is contained in:
Lachlan Hodges 2025-11-25 13:59:25 +11:00 committed by Johannes Berg
parent 24d4da5c25
commit 3fc830cd8c
1 changed files with 3 additions and 0 deletions

View File

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