diff options
author | Ilan Peer <ilan.peer@intel.com> | 2022-09-07 17:23:09 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-10-07 16:23:52 +0300 |
commit | 1403b109c9a5244dc6ab79154f04eecc209ef3d2 (patch) | |
tree | f018ef53efd3da03d50037654610ae40bd754e1c /include/linux/ieee80211.h | |
parent | 7b6f08771bf6045c32a2a1e18201c1aeeb78d72a (diff) | |
download | linux-1403b109c9a5244dc6ab79154f04eecc209ef3d2.tar.xz |
wifi: cfg80211/mac80211: Fix ML element common size calculation
The common size is part of the length in the data
so don't add it again.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/linux/ieee80211.h')
-rw-r--r-- | include/linux/ieee80211.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index bdf668f9dace..442b13333da8 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -4573,18 +4573,17 @@ static inline u8 ieee80211_mle_common_size(const u8 *data) switch (u16_get_bits(control, IEEE80211_ML_CONTROL_TYPE)) { case IEEE80211_ML_CONTROL_TYPE_BASIC: - common += sizeof(struct ieee80211_mle_basic_common_info); - break; case IEEE80211_ML_CONTROL_TYPE_PREQ: - common += sizeof(struct ieee80211_mle_preq_common_info); + case IEEE80211_ML_CONTROL_TYPE_TDLS: + /* + * The length is the first octet pointed by mle->variable so no + * need to add anything + */ break; case IEEE80211_ML_CONTROL_TYPE_RECONF: if (control & IEEE80211_MLC_RECONF_PRES_MLD_MAC_ADDR) common += ETH_ALEN; return common; - case IEEE80211_ML_CONTROL_TYPE_TDLS: - common += sizeof(struct ieee80211_mle_tdls_common_info); - break; case IEEE80211_ML_CONTROL_TYPE_PRIO_ACCESS: if (control & IEEE80211_MLC_PRIO_ACCESS_PRES_AP_MLD_MAC_ADDR) common += ETH_ALEN; |