esp_supplicant: wpa pmf should be disabled

This commit is contained in:
muhaidong 2023-04-19 19:57:27 +08:00
parent 3048251be0
commit 8d383980a1

View File

@ -40,7 +40,7 @@ void *hostap_init(void)
struct wpa_auth_config *auth_conf;
u16 spp_attrubute = 0;
u8 pairwise_cipher;
wifi_pmf_config_t pmf_cfg;
wifi_pmf_config_t pmf_cfg = {0};
uint8_t authmode;
hapd = (struct hostapd_data *)os_zalloc(sizeof(struct hostapd_data));
@ -85,11 +85,12 @@ void *hostap_init(void)
pairwise_cipher = esp_wifi_ap_get_prof_pairwise_cipher_internal();
#ifdef CONFIG_IEEE80211W
esp_wifi_get_pmf_config_internal(&pmf_cfg, WIFI_IF_AP);
if (pmf_cfg.required) {
pairwise_cipher = WIFI_CIPHER_TYPE_CCMP;
if((auth_conf->wpa & WPA_PROTO_RSN) == WPA_PROTO_RSN)
{
esp_wifi_get_pmf_config_internal(&pmf_cfg, WIFI_IF_AP);
if (pmf_cfg.required) {
pairwise_cipher = WIFI_CIPHER_TYPE_CCMP;
}
}
#endif /* CONFIG_IEEE80211W */