Skip to contentSkip to conversation

wifi: cfg80211: default S1G chandef width to 1MHz

PATCH New Lachlan Hodges 1 participant 1 message Oct 21, 2025 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: cfg80211: default S1G chandef width to 1MHz

When management frames are passed down to be transmitted by usermode, often times the NL80211_ATTR_CHANNEL_WIDTH is not used as its implied to be transmitted on the control width. This can lead to errors during chandef validation as the offsets from the channel center are wrong. Ensure we initialise S1G chandefs to a width of 1MHz rather then 20MHz.

---
 net/wireless/nl80211.c | 3 +++
 1 file changed, 3 insertions(+)
net/wireless/nl80211.c +3 -0
index 346dfd2bd987..ceca47cd9e25 100644
@@ -3544,6 +3544,9 @@ static int _nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
 		return -EINVAL;
 	}
 
+	if (cfg80211_chandef_is_s1g(chandef))
+		chandef->width = NL80211_CHAN_WIDTH_1;
+
 	if (attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]) {
 		enum nl80211_channel_type chantype;
 
Signature · 1 line
2.43.0