Commit dd01579e authored by Ryder Lee's avatar Ryder Lee Committed by Johannes Berg

wifi: mac80211: fix the size calculation of ieee80211_ie_len_eht_cap()

Here should return the size of ieee80211_eht_cap_elem_fixed, so fix it.

Fixes: 820acc81 ("mac80211: Add EHT capabilities to association/probe request")
Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
Link: https://lore.kernel.org/r/06c13635fc03bcff58a647b8e03e9f01a74294bd.1679935259.git.ryder.lee@mediatek.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent a16fc383
......@@ -4906,7 +4906,7 @@ u8 ieee80211_ie_len_eht_cap(struct ieee80211_sub_if_data *sdata, u8 iftype)
&eht_cap->eht_cap_elem,
is_ap);
return 2 + 1 +
sizeof(he_cap->he_cap_elem) + n +
sizeof(eht_cap->eht_cap_elem) + n +
ieee80211_eht_ppe_size(eht_cap->eht_ppe_thres[0],
eht_cap->eht_cap_elem.phy_cap_info);
return 0;
......
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