From: Kiran Kumar Lokere Date: Thu, 9 Feb 2023 08:25:30 +0000 (-0800) Subject: Extend wpa_parse_kde_ies() to include EHT capabilities X-Git-Tag: hostap_2_11~988 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f85b2b2dee3b84a80bb3c212b7c918a4950eeb0c;p=thirdparty%2Fhostap.git Extend wpa_parse_kde_ies() to include EHT capabilities This is needed for TDLS. Signed-off-by: Jouni Malinen --- diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c index 1e7a2bd1a..ead724baf 100644 --- a/src/common/wpa_common.c +++ b/src/common/wpa_common.c @@ -3706,6 +3706,11 @@ int wpa_parse_kde_ies(const u8 *buf, size_t len, struct wpa_eapol_ie_parse *ie) sizeof(struct ieee80211_he_6ghz_band_cap) && pos[2] == WLAN_EID_EXT_HE_6GHZ_BAND_CAP) { ie->he_6ghz_capabilities = pos + 3; + } else if (*pos == WLAN_EID_EXTENSION && + pos[1] >= 1 + IEEE80211_EHT_CAPAB_MIN_LEN && + pos[2] == WLAN_EID_EXT_EHT_CAPABILITIES) { + ie->eht_capabilities = pos + 3; + ie->eht_capab_len = pos[1] - 1; } else if (*pos == WLAN_EID_QOS && pos[1] >= 1) { ie->qosinfo = pos[2]; } else if (*pos == WLAN_EID_SUPPORTED_CHANNELS) { diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h index 80c7d324f..1269bf95d 100644 --- a/src/common/wpa_common.h +++ b/src/common/wpa_common.h @@ -689,6 +689,8 @@ struct wpa_eapol_ie_parse { const u8 *he_capabilities; size_t he_capab_len; const u8 *he_6ghz_capabilities; + const u8 *eht_capabilities; + size_t eht_capab_len; const u8 *supp_channels; size_t supp_channels_len; const u8 *supp_oper_classes;