Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ilan Peer and committed by
Johannes Berg
f0e6bea8 ea05fd35

+14
+3
net/mac80211/ieee80211_i.h
··· 1587 1587 const struct ieee80211_s1g_oper_ie *s1g_oper; 1588 1588 const struct ieee80211_s1g_bcn_compat_ie *s1g_bcn_compat; 1589 1589 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; 1590 1592 1591 1593 /* length of them, respectively */ 1592 1594 u8 ext_capab_len; ··· 1610 1608 u8 bssid_index_len; 1611 1609 u8 tx_pwr_env_len[IEEE80211_TPE_MAX_IE_COUNT]; 1612 1610 u8 tx_pwr_env_num; 1611 + u8 eht_cap_len; 1613 1612 1614 1613 /* whether a parse error occurred while retrieving these elements */ 1615 1614 bool parse_error;
+11
net/mac80211/util.c
··· 1008 1008 if (len >= sizeof(*elems->he_6ghz_capa)) 1009 1009 elems->he_6ghz_capa = data; 1010 1010 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; 1011 1022 } 1012 1023 } 1013 1024