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-Tag: v6.17.8~424 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=905bfe0664f13e3587acbe0b40f4ca64557b8ce6;p=thirdparty%2Fkernel%2Fstable.git wifi: mac80211: count reg connection element in the size [ Upstream commit 1373f94148a5adac2f42c8ba9771105624fe4af0 ] 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 Signed-off-by: Sasha Levin --- diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index dd650a127a317..f38881b927d17 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2112,8 +2112,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) +