fix(wpa_supplicant): Add HT20_40 capability in assoc requests

- Add the HT2040 capability indication in the extended caps IE of
  assoc requests.
pull/12720/head
jgujarathi 2023-11-06 16:20:24 +05:30
rodzic 4ef8121157
commit 86fe60ad5a
2 zmienionych plików z 9 dodań i 1 usunięć

Wyświetl plik

@ -21,6 +21,7 @@
#include "esp_rrm.h"
#include "esp_wnm.h"
#include "rsn_supp/wpa.h"
#include "esp_private/wifi.h"
struct wpa_supplicant g_wpa_supp;
@ -550,6 +551,7 @@ static uint8_t get_extended_caps_ie(uint8_t *ie, size_t len)
uint8_t ext_caps_ie[5] = {0};
uint8_t ext_caps_ie_len = 3;
uint8_t *pos = ext_caps_ie;
wifi_ioctl_config_t cfg = {0};
if (!esp_wifi_is_btm_enabled_internal(WIFI_IF_STA)) {
return 0;
@ -557,7 +559,12 @@ static uint8_t get_extended_caps_ie(uint8_t *ie, size_t len)
*pos++ = WLAN_EID_EXT_CAPAB;
*pos++ = ext_caps_ie_len;
*pos++ = 0;
esp_err_t err = esp_wifi_internal_ioctl(WIFI_IOCTL_GET_STA_HT2040_COEX, &cfg);
if (err == ESP_OK && cfg.data.ht2040_coex.enable) {
*pos++ |= BIT(WLAN_EXT_CAPAB_20_40_COEX);
} else {
*pos++ = 0;
}
*pos++ = 0;
#define CAPAB_BSS_TRANSITION BIT(3)
*pos |= CAPAB_BSS_TRANSITION;

Wyświetl plik

@ -258,6 +258,7 @@
/* bits 0-3: Field length (n-1) */
#define WLAN_RSNX_CAPAB_SAE_H2E 5
#define WLAN_EXT_CAPAB_20_40_COEX 0
#define WLAN_EXT_CAPAB_BSS_TRANSITION 19
/* Action frame categories (IEEE Std 802.11-2016, 9.4.1.11, Table 9-76) */