Commit a95fe067 authored by Johannes Berg's avatar Johannes Berg

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: 820acc81 ("mac80211: Add EHT capabilities to association/probe request")
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent df9a9c44
...@@ -987,6 +987,9 @@ static int ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) ...@@ -987,6 +987,9 @@ static int ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
sizeof(struct ieee80211_he_mcs_nss_supp) + sizeof(struct ieee80211_he_mcs_nss_supp) +
IEEE80211_HE_PPE_THRES_MAX_LEN + IEEE80211_HE_PPE_THRES_MAX_LEN +
2 + 1 + sizeof(struct ieee80211_he_6ghz_capa) + 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->ie_len + /* extra IEs */
(assoc_data->fils_kek_len ? 16 /* AES-SIV */ : 0) + (assoc_data->fils_kek_len ? 16 /* AES-SIV */ : 0) +
9 + /* WMM */ 9 + /* WMM */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment