aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-07-01 16:22:29 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-07-15 11:43:18 +0200
commita95fe067825526b10c8a165df2d77db1ddce42fa (patch)
tree18ebe0ece35a5f85bc7bff670f2a2e8b3df273d3 /net/mac80211/mlme.c
parentwifi: mac80211: mlme: simplify adding ht/vht/he/eht elements (diff)
downloadlinux-dev-a95fe067825526b10c8a165df2d77db1ddce42fa.tar.xz
linux-dev-a95fe067825526b10c8a165df2d77db1ddce42fa.zip
wifi: mac80211: consider EHT element size in assoc request
We need to consider the (maximum) size of the EHT element we'll add for the association request, otherwise we may run out of space. Fixes: 820acc810fb6 ("mac80211: Add EHT capabilities to association/probe request") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 152d011c84f0..3cb1f091f17e 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -987,6 +987,9 @@ static int ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
sizeof(struct ieee80211_he_mcs_nss_supp) +
IEEE80211_HE_PPE_THRES_MAX_LEN +
2 + 1 + sizeof(struct ieee80211_he_6ghz_capa) +
+ 2 + 1 + sizeof(struct ieee80211_eht_cap_elem) + /* EHT */
+ sizeof(struct ieee80211_eht_mcs_nss_supp) +
+ IEEE80211_EHT_PPE_THRES_MAX_LEN +
assoc_data->ie_len + /* extra IEs */
(assoc_data->fils_kek_len ? 16 /* AES-SIV */ : 0) +
9 + /* WMM */