From: Miri Korenblit Date: Tue, 26 Aug 2025 17:25:24 +0000 (+0300) Subject: wifi: mac80211: count reg connection element in the size X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1373f94148a5adac2f42c8ba9771105624fe4af0;p=users%2Fhch%2Fmisc.git wifi: mac80211: count reg connection element in the size We currently don't count the reg connection length in the per-link capability length. Fix it. Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250826202512.b14fc82f736b.I03442382e8a07f6f9836bcdac2e22ce8afbe6a21@changeid Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 1008eb8e9b13..353e89973d1e 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2104,8 +2104,11 @@ ieee80211_link_common_elems_size(struct ieee80211_sub_if_data *sdata, sizeof(struct ieee80211_he_mcs_nss_supp) + IEEE80211_HE_PPE_THRES_MAX_LEN; - if (sband->band == NL80211_BAND_6GHZ) + if (sband->band == NL80211_BAND_6GHZ) { size += 2 + 1 + sizeof(struct ieee80211_he_6ghz_capa); + /* reg connection */ + size += 4; + } size += 2 + 1 + sizeof(struct ieee80211_eht_cap_elem) + sizeof(struct ieee80211_eht_mcs_nss_supp) +