Skip to content

Commit f0e6bea

Browse files
ilanpeer2jmberg-intel
authored andcommitted
mac80211: Support parsing EHT elements
Parse the new EHT elements in the element parsing utilities. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Link: https://lore.kernel.org/r/20220214173004.4d52ddaf1af4.Ib6beb1aa85e25b71ce40d3260b2e5b117cc42308@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent ea05fd3 commit f0e6bea

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

net/mac80211/ieee80211_i.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,6 +1587,8 @@ struct ieee802_11_elems {
15871587
const struct ieee80211_s1g_oper_ie *s1g_oper;
15881588
const struct ieee80211_s1g_bcn_compat_ie *s1g_bcn_compat;
15891589
const struct ieee80211_aid_response_ie *aid_resp;
1590+
const struct ieee80211_eht_cap_elem *eht_cap;
1591+
const struct ieee80211_eht_operation *eht_operation;
15901592

15911593
/* length of them, respectively */
15921594
u8 ext_capab_len;
@@ -1608,6 +1610,7 @@ struct ieee802_11_elems {
16081610
u8 bssid_index_len;
16091611
u8 tx_pwr_env_len[IEEE80211_TPE_MAX_IE_COUNT];
16101612
u8 tx_pwr_env_num;
1613+
u8 eht_cap_len;
16111614

16121615
/* whether a parse error occurred while retrieving these elements */
16131616
bool parse_error;

net/mac80211/util.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,17 @@ static void ieee80211_parse_extension_element(u32 *crc,
10081008
if (len >= sizeof(*elems->he_6ghz_capa))
10091009
elems->he_6ghz_capa = data;
10101010
break;
1011+
case WLAN_EID_EXT_EHT_CAPABILITY:
1012+
if (ieee80211_eht_capa_size_ok(elems->he_cap,
1013+
data, len)) {
1014+
elems->eht_cap = data;
1015+
elems->eht_cap_len = len;
1016+
}
1017+
break;
1018+
case WLAN_EID_EXT_EHT_OPERATION:
1019+
if (ieee80211_eht_oper_size_ok(data, len))
1020+
elems->eht_operation = data;
1021+
break;
10111022
}
10121023
}
10131024

0 commit comments

Comments
 (0)