fix(wifi): Made changes in api for sending bcast deauth frames

This commit is contained in:
tarun.kumar
2025-05-16 20:05:50 +05:30
parent e6955dee22
commit b76b02264c
7 changed files with 16 additions and 10 deletions

View File

@@ -104,7 +104,7 @@ cnx_coexist_timeout_process = 0x400020ac;
ieee80211_add_extcap = 0x400020cc;
//ieee80211_alloc_proberesp = 0x400020d8;
esp_wifi_80211_tx = 0x400020f8;
ieee80211_crypto_aes_128_cmac_decrypt = 0x40002104;
/* ieee80211_crypto_aes_128_cmac_decrypt = 0x40002104; */
ieee80211_output_do = 0x4000210c;
ieee80211_send_nulldata = 0x40002110;
//ieee80211_setup_robust_mgmtframe = 0x40002114;

View File

@@ -1010,7 +1010,7 @@ ieee80211_amsdu_length_check = 0x400020ec;
ieee80211_encap_amsdu = 0x400020f0;
ieee80211_output_raw_process = 0x400020f4;
ieee80211_raw_frame_sanity_check = 0x400020fc;
ieee80211_crypto_aes_128_cmac_encrypt = 0x40002100;
/* ieee80211_crypto_aes_128_cmac_encrypt = 0x40002100; */
ieee80211_alloc_tx_buf = 0x40002108;
/* ieee80211_output_do = 0x4000210c; */
/* ieee80211_send_nulldata = 0x40002110; */

View File

@@ -22,6 +22,7 @@
#include "esp_wps.h"
#include "esp_wps_i.h"
#include "rsn_supp/wpa.h"
#include "ap/sta_info.h"
#include "common/sae.h"
#include "ap/ieee802_11.h"
@@ -137,7 +138,7 @@ void *hostap_init(void)
auth_conf->wpa_key_mgmt = WPA_KEY_MGMT_SAE;
}
#endif /* CONFIG_IEEE80211W */
esp_wifi_ap_set_group_mgmt_cipher_internal(cipher_type_map_supp_to_public(auth_conf->group_mgmt_cipher));
spp_attrubute = esp_wifi_get_spp_attrubute_internal(WIFI_IF_AP);
auth_conf->spp_sup.capable = ((spp_attrubute & WPA_CAPABILITY_SPP_CAPABLE) ? SPP_AMSDU_CAP_ENABLE : SPP_AMSDU_CAP_DISABLE);
auth_conf->spp_sup.require = ((spp_attrubute & WPA_CAPABILITY_SPP_REQUIRED) ? SPP_AMSDU_REQ_ENABLE : SPP_AMSDU_REQ_DISABLE);
@@ -173,9 +174,6 @@ void *hostap_init(void)
auth_conf->sae_require_mfp = 1;
#endif /* CONFIG_SAE */
//TODO change it when AP support GCMP-PSK
auth_conf->group_mgmt_cipher = WPA_CIPHER_AES_128_CMAC;
hapd->conf->ap_max_inactivity = 5 * 60;
hostapd_setup_wpa_psk(hapd->conf);

View File

@@ -303,5 +303,6 @@ uint8_t* esp_wifi_sta_get_rsnxe(u8 *bssid);
esp_err_t esp_wifi_sta_connect_internal(const uint8_t *bssid);
void esp_wifi_enable_sae_pk_only_mode_internal(void);
uint8_t esp_wifi_ap_get_transition_disable_internal(void);
void esp_wifi_ap_set_group_mgmt_cipher_internal(wifi_cipher_type_t cipher);
#endif /* _ESP_WIFI_DRIVER_H_ */

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2019-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/

View File

@@ -165,9 +165,8 @@ static inline int wpa_auth_set_key(struct wpa_authenticator *wpa_auth,
if (key) {
wpa_printf (MSG_DEBUG, "%s : igtk idx %d", __func__, idx);
wifi_wpa_igtk_t *igtk = os_malloc(sizeof(wifi_wpa_igtk_t));
if (igtk != NULL) {
memcpy(&igtk->igtk[0], key, WPA_IGTK_LEN);
memcpy(&igtk->igtk[0], key, key_len);
memset((uint8_t*)&igtk->pn[0],0,6);
igtk->keyid[0] = idx;
igtk->keyid[1] = 0;
@@ -2453,6 +2452,8 @@ static int wpa_group_config_group_keys(struct wpa_authenticator *wpa_auth,
struct wpa_group *group)
{
int ret = 0;
size_t len;
len = wpa_cipher_key_len(wpa_auth->conf.group_mgmt_cipher);
if (wpa_auth_set_key(wpa_auth, group->vlan_id,
wpa_cipher_to_alg(wpa_auth->conf.wpa_group),
(uint8_t *)broadcast_ether_addr, group->GN,
@@ -2464,7 +2465,7 @@ static int wpa_group_config_group_keys(struct wpa_authenticator *wpa_auth,
wpa_auth_set_key(wpa_auth, group->vlan_id, WIFI_WPA_ALG_IGTK,
broadcast_ether_addr, group->GN_igtk,
group->IGTK[group->GN_igtk - 4],
WPA_IGTK_LEN) < 0)
len) < 0)
ret = -1;
#endif /* CONFIG_IEEE80211W */

View File

@@ -108,6 +108,12 @@ wifi_cipher_type_t cipher_type_map_supp_to_public(unsigned wpa_cipher)
case WPA_CIPHER_AES_128_CMAC:
return WIFI_CIPHER_TYPE_AES_CMAC128;
case WPA_CIPHER_BIP_GMAC_128:
return WIFI_CIPHER_TYPE_AES_GMAC128;
case WPA_CIPHER_BIP_GMAC_256:
return WIFI_CIPHER_TYPE_AES_GMAC256;
case WPA_CIPHER_SMS4:
return WIFI_CIPHER_TYPE_SMS4;