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>
This commit is contained in:
Ilan Peer 2022-02-14 17:29:59 +01:00 коммит произвёл Johannes Berg
Родитель ea05fd3581
Коммит f0e6bea8bd
2 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -1587,6 +1587,8 @@ struct ieee802_11_elems {
const struct ieee80211_s1g_oper_ie *s1g_oper; const struct ieee80211_s1g_oper_ie *s1g_oper;
const struct ieee80211_s1g_bcn_compat_ie *s1g_bcn_compat; const struct ieee80211_s1g_bcn_compat_ie *s1g_bcn_compat;
const struct ieee80211_aid_response_ie *aid_resp; const struct ieee80211_aid_response_ie *aid_resp;
const struct ieee80211_eht_cap_elem *eht_cap;
const struct ieee80211_eht_operation *eht_operation;
/* length of them, respectively */ /* length of them, respectively */
u8 ext_capab_len; u8 ext_capab_len;
@ -1608,6 +1610,7 @@ struct ieee802_11_elems {
u8 bssid_index_len; u8 bssid_index_len;
u8 tx_pwr_env_len[IEEE80211_TPE_MAX_IE_COUNT]; u8 tx_pwr_env_len[IEEE80211_TPE_MAX_IE_COUNT];
u8 tx_pwr_env_num; u8 tx_pwr_env_num;
u8 eht_cap_len;
/* whether a parse error occurred while retrieving these elements */ /* whether a parse error occurred while retrieving these elements */
bool parse_error; bool parse_error;

Просмотреть файл

@ -1008,6 +1008,17 @@ static void ieee80211_parse_extension_element(u32 *crc,
if (len >= sizeof(*elems->he_6ghz_capa)) if (len >= sizeof(*elems->he_6ghz_capa))
elems->he_6ghz_capa = data; elems->he_6ghz_capa = data;
break; break;
case WLAN_EID_EXT_EHT_CAPABILITY:
if (ieee80211_eht_capa_size_ok(elems->he_cap,
data, len)) {
elems->eht_cap = data;
elems->eht_cap_len = len;
}
break;
case WLAN_EID_EXT_EHT_OPERATION:
if (ieee80211_eht_oper_size_ok(data, len))
elems->eht_operation = data;
break;
} }
} }