Skip to content

Commit afebe19

Browse files
benzeajmberg-intel
authored andcommitted
wifi: cfg80211: only verify part of Extended MLD Capabilities
We verify that the Extended MLD Capabilities are matching between links. However, some bits are reserved and in particular the Recommended Max Links subfield may not necessarily match. So only verify the known subfields that can reliably be expected to be the same. More information can be found in Table 9-417o, in IEEE P802.11be/D7.0. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250609213231.a2fad48dd3e6.Iae1740cd2ac833bc4a64fd2af718e1485158fd42@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent a1d9979 commit afebe19

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

include/linux/ieee80211.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net>
1010
* Copyright (c) 2013 - 2014 Intel Mobile Communications GmbH
1111
* Copyright (c) 2016 - 2017 Intel Deutschland GmbH
12-
* Copyright (c) 2018 - 2024 Intel Corporation
12+
* Copyright (c) 2018 - 2025 Intel Corporation
1313
*/
1414

1515
#ifndef LINUX_IEEE80211_H
@@ -5333,6 +5333,13 @@ static inline u16 ieee80211_mle_get_mld_capa_op(const u8 *data)
53335333
return get_unaligned_le16(common);
53345334
}
53355335

5336+
/* Defined in Figure 9-1074t in P802.11be_D7.0 */
5337+
#define IEEE80211_EHT_ML_EXT_MLD_CAPA_OP_PARAM_UPDATE 0x0001
5338+
#define IEEE80211_EHT_ML_EXT_MLD_CAPA_OP_RECO_MAX_LINKS_MASK 0x001e
5339+
#define IEEE80211_EHT_ML_EXT_MLD_CAPA_NSTR_UPDATE 0x0020
5340+
#define IEEE80211_EHT_ML_EXT_MLD_CAPA_EMLSR_ENA_ON_ONE_LINK 0x0040
5341+
#define IEEE80211_EHT_ML_EXT_MLD_CAPA_BTM_MLD_RECO_MULTI_AP 0x0080
5342+
53365343
/**
53375344
* ieee80211_mle_get_ext_mld_capa_op - returns the extended MLD capabilities
53385345
* and operations.

net/wireless/mlme.c

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,25 @@ cfg80211_mlme_check_mlo_compat(const struct ieee80211_multi_link_elem *mle_a,
352352
return -EINVAL;
353353
}
354354

355-
if (ieee80211_mle_get_ext_mld_capa_op((const u8 *)mle_a) !=
356-
ieee80211_mle_get_ext_mld_capa_op((const u8 *)mle_b)) {
355+
/*
356+
* Only verify the values in Extended MLD Capabilities that are
357+
* not reserved when transmitted by an AP (and expected to remain the
358+
* same over time).
359+
* The Recommended Max Simultaneous Links subfield in particular is
360+
* reserved when included in a unicast Probe Response frame and may
361+
* also change when the AP adds/removes links. The BTM MLD
362+
* Recommendation For Multiple APs Support subfield is reserved when
363+
* transmitted by an AP. All other bits are currently reserved.
364+
* See IEEE P802.11be/D7.0, Table 9-417o.
365+
*/
366+
if ((ieee80211_mle_get_ext_mld_capa_op((const u8 *)mle_a) &
367+
(IEEE80211_EHT_ML_EXT_MLD_CAPA_OP_PARAM_UPDATE |
368+
IEEE80211_EHT_ML_EXT_MLD_CAPA_NSTR_UPDATE |
369+
IEEE80211_EHT_ML_EXT_MLD_CAPA_EMLSR_ENA_ON_ONE_LINK)) !=
370+
(ieee80211_mle_get_ext_mld_capa_op((const u8 *)mle_b) &
371+
(IEEE80211_EHT_ML_EXT_MLD_CAPA_OP_PARAM_UPDATE |
372+
IEEE80211_EHT_ML_EXT_MLD_CAPA_NSTR_UPDATE |
373+
IEEE80211_EHT_ML_EXT_MLD_CAPA_EMLSR_ENA_ON_ONE_LINK))) {
357374
NL_SET_ERR_MSG(extack,
358375
"extended link MLD capabilities/ops mismatch");
359376
return -EINVAL;

0 commit comments

Comments
 (0)