From fe74683489b25bfe6557b8b8c9873cd26a2368f3 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Wed, 26 Apr 2023 21:38:34 +0800 Subject: [PATCH 1/4] esp_supplicant: When the softAP authentication mode is set to WPA2_PSK, WPA2_WPA3_PSK, or WPA3_PSK, the pairwise cipher will be overwritten with WIFI_CIPHER_TYPE_CCMP --- components/esp_wifi/include/esp_wifi_types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/esp_wifi/include/esp_wifi_types.h b/components/esp_wifi/include/esp_wifi_types.h index f8f8b099a7..70588553d7 100644 --- a/components/esp_wifi/include/esp_wifi_types.h +++ b/components/esp_wifi/include/esp_wifi_types.h @@ -256,12 +256,12 @@ typedef struct { uint8_t ssid[32]; /**< SSID of ESP32 soft-AP. If ssid_len field is 0, this must be a Null terminated string. Otherwise, length is set according to ssid_len. */ uint8_t password[64]; /**< Password of ESP32 soft-AP. */ uint8_t ssid_len; /**< Optional length of SSID field. */ - uint8_t channel; /**< Channel of ESP32 soft-AP */ - wifi_auth_mode_t authmode; /**< Auth mode of ESP32 soft-AP. Do not support AUTH_WEP in soft-AP mode */ + uint8_t channel; /**< Channel of soft-AP */ + wifi_auth_mode_t authmode; /**< Auth mode of soft-AP. Do not support AUTH_WEP, AUTH_WAPI_PSK and AUTH_OWE in soft-AP mode. When the auth mode is set to WPA2_PSK, WPA2_WPA3_PSK or WPA3_PSK, the pairwise cipher will be overwritten with WIFI_CIPHER_TYPE_CCMP. */ uint8_t ssid_hidden; /**< Broadcast SSID or not, default 0, broadcast the SSID */ uint8_t max_connection; /**< Max number of stations allowed to connect in */ uint16_t beacon_interval; /**< Beacon interval which should be multiples of 100. Unit: TU(time unit, 1 TU = 1024 us). Range: 100 ~ 60000. Default value: 100 */ - wifi_cipher_type_t pairwise_cipher; /**< pairwise cipher of SoftAP, group cipher will be derived using this. cipher values are valid starting from WIFI_CIPHER_TYPE_TKIP, enum values before that will be considered as invalid and default cipher suites(TKIP+CCMP) will be used. Valid cipher suites in softAP mode are WIFI_CIPHER_TYPE_TKIP, WIFI_CIPHER_TYPE_CCMP and WIFI_CIPHER_TYPE_TKIP_CCMP. */ + wifi_cipher_type_t pairwise_cipher; /**< Pairwise cipher of SoftAP, group cipher will be derived using this. Cipher values are valid starting from WIFI_CIPHER_TYPE_TKIP, enum values before that will be considered as invalid and default cipher suites(TKIP+CCMP) will be used. Valid cipher suites in softAP mode are WIFI_CIPHER_TYPE_TKIP, WIFI_CIPHER_TYPE_CCMP and WIFI_CIPHER_TYPE_TKIP_CCMP. */ bool ftm_responder; /**< Enable FTM Responder mode */ } wifi_ap_config_t; From 91d4132f4cf8b4596133421e1ef869a57b09e78a Mon Sep 17 00:00:00 2001 From: muhaidong Date: Fri, 26 May 2023 12:04:20 +0800 Subject: [PATCH 2/4] esp_wifi: fix some txop issues --- components/esp_rom/esp32c3/ld/esp32c3.rom.ld | 2 +- components/esp_rom/esp32s3/ld/esp32s3.rom.ld | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld index 9defde5c0c..b0c8c5293e 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld @@ -1608,7 +1608,7 @@ lmacReachLongLimit = 0x40001618; lmacReachShortLimit = 0x4000161c; lmacRecycleMPDU = 0x40001620; lmacRxDone = 0x40001624; -lmacSetTxFrame = 0x40001628; +/*lmacSetTxFrame = 0x40001628;*/ lmacTxFrame = 0x40001630; mac_tx_set_duration = 0x40001634; /* mac_tx_set_htsig = 0x40001638; */ diff --git a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld index 6df6dd22cc..1109df9c70 100644 --- a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld +++ b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld @@ -1918,7 +1918,7 @@ lmacReachLongLimit = 0x40005388; lmacReachShortLimit = 0x40005394; lmacRecycleMPDU = 0x400053a0; lmacRxDone = 0x400053ac; -lmacSetTxFrame = 0x400053b8; +/*lmacSetTxFrame = 0x400053b8;*/ lmacTxDone = 0x400053c4; lmacTxFrame = 0x400053d0; mac_tx_set_duration = 0x400053dc; From f563e19e92d85631465e43180d9dc5f1a0418998 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Thu, 13 Jul 2023 16:33:42 +0800 Subject: [PATCH 3/4] fix(wifi): missed annotate ld function from txop fix --- components/esp_rom/esp32c3/ld/esp32c3.rom.ld | 2 +- components/esp_rom/esp32s3/ld/esp32s3.rom.ld | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld index b0c8c5293e..105032b721 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld @@ -1595,7 +1595,7 @@ ic_interface_enabled = 0x400015e4; is_lmac_idle = 0x400015e8; lmacAdjustTimestamp = 0x400015ec; lmacDiscardAgedMSDU = 0x400015f0; -lmacDiscardMSDU = 0x400015f4; +/*lmacDiscardMSDU = 0x400015f4;*/ lmacEndFrameExchangeSequence = 0x400015f8; lmacIsIdle = 0x400015fc; lmacIsLongFrame = 0x40001600; diff --git a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld index 1109df9c70..78b918a676 100644 --- a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld +++ b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld @@ -1905,7 +1905,7 @@ ic_interface_enabled = 0x400052ec; is_lmac_idle = 0x400052f8; lmacAdjustTimestamp = 0x40005304; lmacDiscardAgedMSDU = 0x40005310; -lmacDiscardMSDU = 0x4000531c; +/*lmacDiscardMSDU = 0x4000531c;*/ lmacEndFrameExchangeSequence = 0x40005328; lmacIsIdle = 0x40005334; lmacIsLongFrame = 0x40005340; From 911653fffb79b1ac24c1d44a11be7c9073dca1f7 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Tue, 25 Jul 2023 13:01:48 +0800 Subject: [PATCH 4/4] fix(wifi): fix some wifi bugs 230725 1. update pairwise cipher in softAP 2. overwrite pairwise cipher when softap auth mode is wpa2 wpa2_wpa3 wpa3 3. fix single tail queue conjunct issue 4. fix some txop issues 5. process association request verify ssid 6. fix sta rx csa issue 7. fix ftm timer macro issue --- components/esp_wifi/lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index c6a1eca8ec..6c3fda2460 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit c6a1eca8ec99f0a0f3c9d8017801b5999534651f +Subproject commit 6c3fda24604a9a21b852c6318d92c89127f6cdb4