Skip to contentSkip to conversation

wifi: cfg80211: include cf1 offset when sending chandef

PATCH New Lachlan Hodges 1 participant 1 message Jul 21 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: cfg80211: include cf1 offset when sending chandef

The cf1 offset is not included when sending the chandef leading to incorrect channel resolution in usermode. Include it.

---
 net/wireless/nl80211.c | 4 ++++
 1 file changed, 4 insertions(+)
net/wireless/nl80211.c +4 -0
index 242071ad10d6..3d1452ee32f2 100644
@@ -4627,6 +4627,10 @@ int nl80211_send_chandef(struct sk_buff *msg, const struct cfg80211_chan_def *ch
 		return -ENOBUFS;
 	if (nla_put_u32(msg, NL80211_ATTR_CENTER_FREQ1, chandef->center_freq1))
 		return -ENOBUFS;
+	if (chandef->freq1_offset &&
+	    nla_put_u32(msg, NL80211_ATTR_CENTER_FREQ1_OFFSET,
+			chandef->freq1_offset))
+		return -ENOBUFS;
 	if (chandef->center_freq2 &&
 	    nla_put_u32(msg, NL80211_ATTR_CENTER_FREQ2, chandef->center_freq2))
 		return -ENOBUFS;
Signature · 1 line
2.43.0