From: Ilan Peer Date: Sun, 18 Jun 2023 18:49:45 +0000 (+0300) Subject: wifi: ieee80211: Fix the common size calculation for reconfiguration ML X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=cbee1b9760c3c8a8897d85683e46b03f3177b089;p=carl9170fw.git wifi: ieee80211: Fix the common size calculation for reconfiguration ML The common information length is found in the first octet of the common information. Fixes: 0f48b8b88aa9 ("wifi: ieee80211: add definitions for multi-link element") Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230618214435.3c7ed4817338.I42ef706cb827b4dade6e4ffbb6e7f341eaccd398@changeid Signed-off-by: Johannes Berg Signed-off-by: Christian Lamparter --- diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index add68ff..01f4229 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -4546,15 +4546,12 @@ static inline u8 ieee80211_mle_common_size(const u8 *data) case IEEE80211_ML_CONTROL_TYPE_BASIC: case IEEE80211_ML_CONTROL_TYPE_PREQ: case IEEE80211_ML_CONTROL_TYPE_TDLS: + case IEEE80211_ML_CONTROL_TYPE_RECONF: /* * 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 += 6; - return common; case IEEE80211_ML_CONTROL_TYPE_PRIO_ACCESS: if (control & IEEE80211_MLC_PRIO_ACCESS_PRES_AP_MLD_MAC_ADDR) common += 6;