aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2024-01-11 18:17:41 +0200
committerJohannes Berg <johannes.berg@intel.com>2024-01-26 09:39:50 +0100
commitf73ef56c941248ae8b1e19862e11a7bb517b9af1 (patch)
tree828ccbe359e202c3be6b8e995c8caf6798d74383 /net/mac80211
parentd1155f2873cfd387ffb7f5423edbfb2bb22eaf32 (diff)
downloadlinux-f73ef56c941248ae8b1e19862e11a7bb517b9af1.tar.gz
wifi: mac80211: remove extra element parsing
We already parse all the BSS elements into elems, there's really no need to separately find EHT/ML again. Remove the extra code. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240111181514.c4a55da9f778.I112b1ef00904c4183ac7644800f8daa8a4449875@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mlme.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 6fa69ad3ad4f89..45be270eaab7a2 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -4962,32 +4962,12 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
(IEEE80211_CONN_DISABLE_HE |
IEEE80211_CONN_DISABLE_EHT)) &&
he_oper) {
- const struct cfg80211_bss_ies *cbss_ies;
- const struct element *eht_ml_elem;
- const u8 *eht_oper_ie;
-
- cbss_ies = rcu_dereference(cbss->ies);
- eht_oper_ie = cfg80211_find_ext_ie(WLAN_EID_EXT_EHT_OPERATION,
- cbss_ies->data, cbss_ies->len);
- if (eht_oper_ie && eht_oper_ie[1] >=
- 1 + sizeof(struct ieee80211_eht_operation))
- eht_oper = (void *)(eht_oper_ie + 3);
- else
- eht_oper = NULL;
+ eht_oper = elems->eht_operation;
if (!ieee80211_verify_sta_eht_mcs_support(sdata, sband, eht_oper))
*conn_flags |= IEEE80211_CONN_DISABLE_EHT;
- eht_ml_elem = cfg80211_find_ext_elem(WLAN_EID_EXT_EHT_MULTI_LINK,
- cbss_ies->data, cbss_ies->len);
-
- /* data + 1 / datalen - 1 since it's an extended element */
- if (!(*conn_flags & IEEE80211_CONN_DISABLE_EHT) &&
- eht_ml_elem &&
- ieee80211_mle_type_ok(eht_ml_elem->data + 1,
- IEEE80211_ML_CONTROL_TYPE_BASIC,
- eht_ml_elem->datalen - 1))
- supports_mlo = true;
+ supports_mlo = elems->ml_basic;
}
/* Allow VHT if at least one channel on the sband supports 80 MHz */