esp_wifi: WPA3 SAE H2E support for station

This commit is contained in:
Shreyas Sheth
2022-06-16 19:31:02 +05:30
committed by gauri patankar
parent 692b9980b5
commit 591c7a496c
24 changed files with 1673 additions and 248 deletions

View File

@@ -365,6 +365,25 @@ int wpa_cipher_valid_mgmt_group(int cipher)
cipher == WPA_CIPHER_BIP_GMAC_256;
}
int wpa_parse_wpa_ie_rsnxe(const u8 *rsnxe_ie, size_t rsnxe_ie_len,
struct wpa_ie_data *data)
{
uint8_t rsnxe_capa = 0;
uint8_t sae_pwe = esp_wifi_get_config_sae_pwe_h2e_internal();
memset(data, 0, sizeof(*data));
if (rsnxe_ie_len < 1) {
return -1;
}
rsnxe_capa = rsnxe_ie[2];
if (sae_pwe == 1 && !(rsnxe_capa & BIT(WLAN_RSNX_CAPAB_SAE_H2E))){
wpa_printf(MSG_ERROR, "SAE H2E required, but not supported by the AP");
return -1;
}
data->rsnxe_capa = rsnxe_capa;
return 0;
}
/**
* wpa_parse_wpa_ie_rsn - Parse RSN IE
* @rsn_ie: Buffer containing RSN IE
@@ -941,7 +960,8 @@ int wpa_compare_rsn_ie(int ft_initial_assoc,
ie1d.group_cipher == ie2d.group_cipher &&
ie1d.key_mgmt == ie2d.key_mgmt &&
ie1d.capabilities == ie2d.capabilities &&
ie1d.mgmt_group_cipher == ie2d.mgmt_group_cipher)
ie1d.mgmt_group_cipher == ie2d.mgmt_group_cipher &&
ie1d.rsnxe_capa == ie2d.rsnxe_capa)
return 0;
}
#endif /* CONFIG_IEEE80211R */