From 87968f84063f125d2ad9a11bd188e09da962a7f4 Mon Sep 17 00:00:00 2001 From: dongyou Date: Fri, 27 Nov 2020 14:22:48 +0800 Subject: [PATCH 1/7] esp_wifi: Add documentation to avoid using WiFi modem sleep for WiFi/BT coexistence Remove description of unusable API esp_wifi_restart() Update esp_now_fetch_peer discription Update description for ssid and password --- components/esp_common/src/esp_err_to_name.c | 2 +- components/esp_wifi/include/esp_now.h | 2 +- components/esp_wifi/include/esp_wifi.h | 32 +++----------------- components/esp_wifi/include/esp_wifi_types.h | 6 ++-- docs/en/api-guides/wifi.rst | 16 +++++----- 5 files changed, 16 insertions(+), 42 deletions(-) diff --git a/components/esp_common/src/esp_err_to_name.c b/components/esp_common/src/esp_err_to_name.c index 808f369716..32f04373ae 100644 --- a/components/esp_common/src/esp_err_to_name.c +++ b/components/esp_common/src/esp_err_to_name.c @@ -347,7 +347,7 @@ static const esp_err_msg_t esp_err_msg_table[] = { ERR_TBL_IT(ESP_ERR_WIFI_POST), /* 12306 0x3012 Failed to post the event to WiFi task */ # endif # ifdef ESP_ERR_WIFI_INIT_STATE - ERR_TBL_IT(ESP_ERR_WIFI_INIT_STATE), /* 12307 0x3013 Invalod WiFi state when init/deinit is called */ + ERR_TBL_IT(ESP_ERR_WIFI_INIT_STATE), /* 12307 0x3013 Invalid WiFi state when init/deinit is called */ # endif # ifdef ESP_ERR_WIFI_STOP_STATE ERR_TBL_IT(ESP_ERR_WIFI_STOP_STATE), /* 12308 0x3014 Returned when WiFi is stopping */ diff --git a/components/esp_wifi/include/esp_now.h b/components/esp_wifi/include/esp_now.h index 981c9001e4..2f20c5d392 100644 --- a/components/esp_wifi/include/esp_now.h +++ b/components/esp_wifi/include/esp_now.h @@ -252,7 +252,7 @@ esp_err_t esp_now_mod_peer(const esp_now_peer_info_t *peer); esp_err_t esp_now_get_peer(const uint8_t *peer_addr, esp_now_peer_info_t *peer); /** - * @brief Fetch a peer from peer list + * @brief Fetch a peer from peer list. Only return the peer which address is unicast, for the multicast/broadcast address, the function will ignore and try to find the next in the peer list. * * @param from_head fetch from head of list or not * @param peer peer information diff --git a/components/esp_wifi/include/esp_wifi.h b/components/esp_wifi/include/esp_wifi.h index eba2d14b8f..4cdf44f2f4 100644 --- a/components/esp_wifi/include/esp_wifi.h +++ b/components/esp_wifi/include/esp_wifi.h @@ -86,7 +86,7 @@ extern "C" { #define ESP_ERR_WIFI_NOT_CONNECT (ESP_ERR_WIFI_BASE + 15) /*!< Station still in disconnect status */ #define ESP_ERR_WIFI_POST (ESP_ERR_WIFI_BASE + 18) /*!< Failed to post the event to WiFi task */ -#define ESP_ERR_WIFI_INIT_STATE (ESP_ERR_WIFI_BASE + 19) /*!< Invalod WiFi state when init/deinit is called */ +#define ESP_ERR_WIFI_INIT_STATE (ESP_ERR_WIFI_BASE + 19) /*!< Invalid WiFi state when init/deinit is called */ #define ESP_ERR_WIFI_STOP_STATE (ESP_ERR_WIFI_BASE + 20) /*!< Returned when WiFi is stopping */ /** @@ -310,7 +310,7 @@ esp_err_t esp_wifi_stop(void); * @brief Restore WiFi stack persistent settings to default values * * This function will reset settings made using the following APIs: - * - esp_wifi_get_auto_connect, + * - esp_wifi_set_bandwidth, * - esp_wifi_set_protocol, * - esp_wifi_set_config related * - esp_wifi_set_mode @@ -884,32 +884,8 @@ esp_err_t esp_wifi_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx); * @attention 3. Mapping Table {Power, max_tx_power} = {{8, 2}, {20, 5}, {28, 7}, {34, 8}, {44, 11}, * {52, 13}, {56, 14}, {60, 15}, {66, 16}, {72, 18}, {78, 20}}. * @attention 4. Param power unit is 0.25dBm, range is [8, 78] corresponding to 2dBm - 20dBm. - * @attention 5. Relationship between set value and actual value. As follows: - * +------------+--------------+ - * | set value | actual value | - * +============+==============+ - * | [8, 19] | 8 | - * +------------+--------------+ - * | [20, 27] | 20 | - * +------------+--------------+ - * | [28, 33] | 28 | - * +------------+--------------+ - * | [34, 43] | 34 | - * +------------+--------------+ - * | [44, 51] | 44 | - * +------------+--------------+ - * | [52, 55] | 52 | - * +------------+--------------+ - * | [56, 59] | 56 | - * +------------+--------------+ - * | [60, 65] | 60 | - * +------------+--------------+ - * | [66, 71] | 66 | - * +------------+--------------+ - * | [72, 77] | 72 | - * +------------+--------------+ - * | 78 | 78 | - * +------------+--------------+ + * @attention 5. Relationship between set value and actual value. As follows: {set value range, actual value} = {{[8, 19],8}, {[20, 27],20}, {[28, 33],28}, {[34, 43],34}, {[44, 51],44}, {[52, 55],52}, {[56, 59],56}, {[60, 65],60}, {[66, 71],66}, {[72, 77],72}, {78,78}} + * * @param power Maximum WiFi transmitting power. * * @return diff --git a/components/esp_wifi/include/esp_wifi_types.h b/components/esp_wifi/include/esp_wifi_types.h index da8c16b3bc..fa7cb1393d 100644 --- a/components/esp_wifi/include/esp_wifi_types.h +++ b/components/esp_wifi/include/esp_wifi_types.h @@ -214,7 +214,7 @@ typedef struct { /** @brief Soft-AP configuration settings for the ESP32 */ 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. Null terminated string. */ + 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 */ @@ -225,8 +225,8 @@ typedef struct { /** @brief STA configuration settings for the ESP32 */ typedef struct { - uint8_t ssid[32]; /**< SSID of target AP. Null terminated string. */ - uint8_t password[64]; /**< Password of target AP. Null terminated string.*/ + uint8_t ssid[32]; /**< SSID of target AP. */ + uint8_t password[64]; /**< Password of target AP. */ wifi_scan_method_t scan_method; /**< do all channel scan or fast scan */ bool bssid_set; /**< whether set MAC address of target AP or not. Generally, station_config.bssid_set needs to be 0; and it needs to be 1 only when users need to check the MAC address of the AP.*/ uint8_t bssid[6]; /**< MAC address of target AP*/ diff --git a/docs/en/api-guides/wifi.rst b/docs/en/api-guides/wifi.rst index 5007f3512f..fca86c6e68 100644 --- a/docs/en/api-guides/wifi.rst +++ b/docs/en/api-guides/wifi.rst @@ -163,9 +163,9 @@ WIFI_EVENT_STA_DISCONNECTED ++++++++++++++++++++++++++++++++++++ This event can be generated in the following scenarios: - - When esp_wifi_disconnect(), or esp_wifi_stop(), or esp_wifi_deinit(), or esp_wifi_restart() is called and the station is already connected to the AP. - - When esp_wifi_connect() is called, but the Wi-Fi driver fails to set up a connection with the AP due to certain reasons, e.g. the scan fails to find the target AP, authentication times out, etc. If there are more than one AP with the same SSID, the disconnected event is raised after the station fails to connect all of the found APs. - - When the Wi-Fi connection is disrupted because of specific reasons, e.g., the station continuously loses N beacons, the AP kicks off the station, the AP's authentication mode is changed, etc. + - When :cpp:func:`esp_wifi_disconnect()`, or :cpp:func:`esp_wifi_stop()`, or :cpp:func:`esp_wifi_deinit()` is called and the station is already connected to the AP. + - When :cpp:func:`esp_wifi_connect()` is called, but the Wi-Fi driver fails to set up a connection with the AP due to certain reasons, e.g. the scan fails to find the target AP, authentication times out, etc. If there are more than one AP with the same SSID, the disconnected event is raised after the station fails to connect all of the found APs. + - When the Wi-Fi connection is disrupted because of specific reasons, e.g., the station continuously loses N beacons, the AP kicks off the station, the AP's authentication mode is changed, etc. Upon receiving this event, the default behavior of the event task is: - Shuts down the station's LwIP netif. @@ -224,8 +224,8 @@ WIFI_EVENT_AP_STADISCONNECTED ++++++++++++++++++++++++++++++++++++ This event can happen in the following scenarios: - - The application calls esp_wifi_disconnect(), or esp_wifi_deauth_sta(), to manually disconnect the station. - - The Wi-Fi driver kicks off the station, e.g. because the AP has not received any packets in the past five minutes, etc. + - The application calls :cpp:func:`esp_wifi_disconnect()`, or esp_wifi_deauth_sta(), to manually disconnect the station. + - The Wi-Fi driver kicks off the station, e.g. because the AP has not received any packets in the past five minutes, etc. The time can be modified by :cpp:func:`esp_wifi_set_inactive_time`. - The station kicks off the AP. When this event happens, the event task will do nothing, but the application event callback needs to do something, e.g., close the socket which is related to this station, etc. @@ -1446,7 +1446,7 @@ In maximum power save mode, station wakes up every listen interval to receive be Call ``esp_wifi_set_ps(WIFI_PS_MIN_MODEM)`` to enable Modem-sleep minimum power save mode or ``esp_wifi_set_ps(WIFI_PS_MAX_MODEM)`` to enable Modem-sleep maximum power save mode after calling :cpp:func:`esp_wifi_init`. When station connects to AP, Modem-sleep will start. When station disconnects from AP, Modem-sleep will stop. -Call ``esp_wifi_set_ps(WIFI_PS_NONE)`` to disable modem sleep entirely. This has much higher power consumption, but provides minimum latency for receiving Wi-Fi data in real time. When modem sleep is enabled, received Wi-Fi data can be delayed for as long as the DTIM period (minimum power save mode) or the listen interval (maximum power save mode). +Call ``esp_wifi_set_ps(WIFI_PS_NONE)`` to disable modem sleep entirely. This has much higher power consumption, but provides minimum latency for receiving Wi-Fi data in real time. When modem sleep is enabled, received Wi-Fi data can be delayed for as long as the DTIM period (minimum power save mode) or the listen interval (maximum power save mode). Disabling modem sleep entirely is not possible for Wi-Fi and Bluetooth coexist mode. The default Modem-sleep mode is WIFI_PS_MIN_MODEM. @@ -1493,9 +1493,7 @@ When the throughput is tested by iperf example, the sdkconfig is :idf_file:`exam Wi-Fi 80211 Packet Send --------------------------- -**Important notes: The API esp_wifi_80211_tx is not available in IDF 2.1, but will be so in the upcoming release.** - -The esp_wifi_80211_tx API can be used to: +The :cpp:func:`esp_wifi_80211_tx` API can be used to: - Send the beacon, probe request, probe response, action frame. - Send the non-QoS data frame. From 18b6ed65f11007a1b552a810a6beeb5f8fa08956 Mon Sep 17 00:00:00 2001 From: ronghulin Date: Mon, 21 Dec 2020 15:44:00 +0800 Subject: [PATCH 2/7] bugfix: fix some wifi bugs 1. fix max tx power to 20dBm 2. fix the issue that the esp_wifi_sta_get_ap_info can't get country Closes https://github.com/espressif/esp-idf/issues/6267 --- components/esp_wifi/esp32/include/phy_init_data.h | 2 +- components/esp_wifi/include/esp_wifi.h | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/esp_wifi/esp32/include/phy_init_data.h b/components/esp_wifi/esp32/include/phy_init_data.h index 2cb12a7378..031813f5b7 100644 --- a/components/esp_wifi/esp32/include/phy_init_data.h +++ b/components/esp_wifi/esp32/include/phy_init_data.h @@ -77,7 +77,7 @@ static const esp_phy_init_data_t phy_init_data= { { 0x18, 0x18, 0x18, - LIMIT(CONFIG_ESP32_PHY_MAX_TX_POWER * 4, 40, 78), + LIMIT(CONFIG_ESP32_PHY_MAX_TX_POWER * 4, 40, 84), LIMIT(CONFIG_ESP32_PHY_MAX_TX_POWER * 4, 40, 72), LIMIT(CONFIG_ESP32_PHY_MAX_TX_POWER * 4, 40, 66), LIMIT(CONFIG_ESP32_PHY_MAX_TX_POWER * 4, 40, 60), diff --git a/components/esp_wifi/include/esp_wifi.h b/components/esp_wifi/include/esp_wifi.h index 4cdf44f2f4..7b5b3f2dcd 100644 --- a/components/esp_wifi/include/esp_wifi.h +++ b/components/esp_wifi/include/esp_wifi.h @@ -445,6 +445,8 @@ esp_err_t esp_wifi_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_re /** * @brief Get information of AP which the ESP32 station is associated with * + * @attention When the obtained country information is empty, it means that the AP does not carry country information + * * @param ap_info the wifi_ap_record_t to hold AP information * sta can get the connected ap's phy mode info through the struct member * phy_11b,phy_11g,phy_11n,phy_lr in the wifi_ap_record_t struct. @@ -882,9 +884,9 @@ esp_err_t esp_wifi_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx); * @attention 1. Maximum power before wifi startup is limited by PHY init data bin. * @attention 2. The value set by this API will be mapped to the max_tx_power of the structure wifi_country_t variable. * @attention 3. Mapping Table {Power, max_tx_power} = {{8, 2}, {20, 5}, {28, 7}, {34, 8}, {44, 11}, - * {52, 13}, {56, 14}, {60, 15}, {66, 16}, {72, 18}, {78, 20}}. - * @attention 4. Param power unit is 0.25dBm, range is [8, 78] corresponding to 2dBm - 20dBm. - * @attention 5. Relationship between set value and actual value. As follows: {set value range, actual value} = {{[8, 19],8}, {[20, 27],20}, {[28, 33],28}, {[34, 43],34}, {[44, 51],44}, {[52, 55],52}, {[56, 59],56}, {[60, 65],60}, {[66, 71],66}, {[72, 77],72}, {78,78}} + * {52, 13}, {56, 14}, {60, 15}, {66, 16}, {72, 18}, {80, 20}}. + * @attention 4. Param power unit is 0.25dBm, range is [8, 84] corresponding to 2dBm - 20dBm. + * @attention 5. Relationship between set value and actual value. As follows: {set value range, actual value} = {{[8, 19],8}, {[20, 27],20}, {[28, 33],28}, {[34, 43],34}, {[44, 51],44}, {[52, 55],52}, {[56, 59],56}, {[60, 65],60}, {[66, 71],66}, {[72, 79],72}, {[80, 84],80}}. * * @param power Maximum WiFi transmitting power. * From f4bb2b466c10b7345d3e41b86f9f5254715fcffb Mon Sep 17 00:00:00 2001 From: ChenJianxing Date: Fri, 13 Nov 2020 16:11:11 +0800 Subject: [PATCH 3/7] esp_wifi: optimize phy version log --- components/esp_wifi/include/esp_phy_init.h | 7 +++++++ components/esp_wifi/src/phy_init.c | 3 +++ 2 files changed, 10 insertions(+) diff --git a/components/esp_wifi/include/esp_phy_init.h b/components/esp_wifi/include/esp_phy_init.h index 1e5c3cf945..fe8a09afa6 100644 --- a/components/esp_wifi/include/esp_phy_init.h +++ b/components/esp_wifi/include/esp_phy_init.h @@ -244,6 +244,13 @@ esp_err_t esp_modem_sleep_deregister(modem_sleep_module_t module); * microsecond since boot when phy/rf was last switched on */ int64_t esp_phy_rf_get_on_ts(void); + +/** + * @brief Get PHY lib version + * @return PHY lib version. + */ +char * get_phy_version_str(void); + #ifdef __cplusplus } #endif diff --git a/components/esp_wifi/src/phy_init.c b/components/esp_wifi/src/phy_init.c index 3fd604f158..92548f72c7 100644 --- a/components/esp_wifi/src/phy_init.c +++ b/components/esp_wifi/src/phy_init.c @@ -640,6 +640,9 @@ static void __attribute((unused)) esp_phy_reduce_tx_power(esp_phy_init_data_t* i void esp_phy_load_cal_and_init(phy_rf_module_t module) { + char * phy_version = get_phy_version_str(); + ESP_LOGI(TAG, "phy_version %s", phy_version); + esp_phy_calibration_data_t* cal_data = (esp_phy_calibration_data_t*) calloc(sizeof(esp_phy_calibration_data_t), 1); if (cal_data == NULL) { From 37ce175bb5dad4c906a6d5b754eeb3723cd4d9ae Mon Sep 17 00:00:00 2001 From: xiehang Date: Tue, 5 Jan 2021 20:21:48 +0800 Subject: [PATCH 4/7] esp_wifi: ESP32 phy add [sections:phy_iram] --- components/esp32/ld/esp32_fragments.lf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/esp32/ld/esp32_fragments.lf b/components/esp32/ld/esp32_fragments.lf index c729c86c80..7f8abe6f9f 100644 --- a/components/esp32/ld/esp32_fragments.lf +++ b/components/esp32/ld/esp32_fragments.lf @@ -52,6 +52,10 @@ entries: entries: .wifirxiram+ +[sections:phy_iram] +entries: + .phyiram+ + [scheme:default] entries: if APP_BUILD_USE_FLASH_SECTIONS = y: @@ -71,6 +75,7 @@ entries: rtc_bss -> rtc_bss wifi_iram -> flash_text wifi_rx_iram -> flash_text + phy_iram -> flash_text [scheme:rtc] entries: @@ -100,3 +105,7 @@ entries: [scheme:wifi_rx_iram] entries: wifi_rx_iram -> iram0_text + +[scheme:phy_iram] +entries: + phy_iram -> iram0_text From c907da0656c7b4820c6fc74a959459bc9766f738 Mon Sep 17 00:00:00 2001 From: "kapil.gupta" Date: Thu, 10 Sep 2020 15:39:54 +0530 Subject: [PATCH 5/7] esp_wifi: Add support for 802.1x sha256 auth key mode --- .../src/esp_supplicant/esp_wifi_driver.h | 3 ++- components/wpa_supplicant/src/rsn_supp/wpa.c | 22 +++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/components/wpa_supplicant/src/esp_supplicant/esp_wifi_driver.h b/components/wpa_supplicant/src/esp_supplicant/esp_wifi_driver.h index ed8495ee13..1fe4d5d689 100644 --- a/components/wpa_supplicant/src/esp_supplicant/esp_wifi_driver.h +++ b/components/wpa_supplicant/src/esp_supplicant/esp_wifi_driver.h @@ -65,7 +65,8 @@ enum { WPA2_AUTH_CCKM = 0x07, WPA2_AUTH_PSK_SHA256= 0x08, WPA3_AUTH_PSK = 0x09, - WPA2_AUTH_INVALID = 0x0a, + WPA2_AUTH_ENT_SHA256= 0x0a, + WPA2_AUTH_INVALID = 0x0b, }; typedef enum { diff --git a/components/wpa_supplicant/src/rsn_supp/wpa.c b/components/wpa_supplicant/src/rsn_supp/wpa.c index eaa39448da..ddfd7e09a6 100644 --- a/components/wpa_supplicant/src/rsn_supp/wpa.c +++ b/components/wpa_supplicant/src/rsn_supp/wpa.c @@ -137,6 +137,20 @@ uint32_t cipher_type_map_public_to_supp(wifi_cipher_type_t cipher) } } +static bool is_wpa2_enterprise_connection(void) +{ + uint8_t authmode; + + if (esp_wifi_sta_prof_is_wpa2_internal()) { + authmode = esp_wifi_sta_get_prof_authmode_internal(); + if ((authmode == WPA2_AUTH_ENT) || (authmode == WPA2_AUTH_ENT_SHA256)) { + return true; + } + } + + return false; +} + /** * get_bssid - Get the current BSSID * @priv: private driver interface data @@ -588,8 +602,7 @@ void wpa_supplicant_process_1_of_4(struct wpa_sm *sm, if (res) goto failed; - if (esp_wifi_sta_prof_is_wpa2_internal() && - esp_wifi_sta_get_prof_authmode_internal() == WPA2_AUTH_ENT) { + if (is_wpa2_enterprise_connection()) { pmksa_cache_set_current(sm, NULL, sm->bssid, 0, 0); } @@ -2087,6 +2100,8 @@ void wpa_set_profile(u32 wpa_proto, u8 auth_mode) sm->proto = wpa_proto; if (auth_mode == WPA2_AUTH_ENT) { sm->key_mgmt = WPA_KEY_MGMT_IEEE8021X; /* for wpa2 enterprise */ + } else if (auth_mode == WPA2_AUTH_ENT_SHA256) { + sm->key_mgmt = WPA_KEY_MGMT_IEEE8021X_SHA256; /* for wpa2 enterprise sha256 */ } else if (auth_mode == WPA2_AUTH_PSK_SHA256) { sm->key_mgmt = WPA_KEY_MGMT_PSK_SHA256; } else if (auth_mode == WPA3_AUTH_PSK) { @@ -2126,8 +2141,7 @@ int wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher, sm->ap_notify_completed_rsne = esp_wifi_sta_is_ap_notify_completed_rsne_internal(); if (sm->key_mgmt == WPA_KEY_MGMT_SAE || - (esp_wifi_sta_prof_is_wpa2_internal() && - esp_wifi_sta_get_prof_authmode_internal() == WPA2_AUTH_ENT)) { + is_wpa2_enterprise_connection()) { if (!esp_wifi_skip_supp_pmkcaching()) { pmksa_cache_set_current(sm, NULL, (const u8*) bssid, 0, 0); wpa_sm_set_pmk_from_pmksa(sm); From 40f124b0d051d2f210595fb1b8c32af4aeae5eb4 Mon Sep 17 00:00:00 2001 From: xiehang Date: Wed, 6 Jan 2021 20:08:30 +0800 Subject: [PATCH 6/7] esp_wifi: Add macro control for phy log --- components/esp_wifi/include/esp_phy_init.h | 2 ++ components/esp_wifi/src/phy_init.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/components/esp_wifi/include/esp_phy_init.h b/components/esp_wifi/include/esp_phy_init.h index fe8a09afa6..e217a8ed43 100644 --- a/components/esp_wifi/include/esp_phy_init.h +++ b/components/esp_wifi/include/esp_phy_init.h @@ -245,11 +245,13 @@ esp_err_t esp_modem_sleep_deregister(modem_sleep_module_t module); */ int64_t esp_phy_rf_get_on_ts(void); +#if CONFIG_IDF_TARGET_ESP32 /** * @brief Get PHY lib version * @return PHY lib version. */ char * get_phy_version_str(void); +#endif #ifdef __cplusplus } diff --git a/components/esp_wifi/src/phy_init.c b/components/esp_wifi/src/phy_init.c index 92548f72c7..3059bc0e2f 100644 --- a/components/esp_wifi/src/phy_init.c +++ b/components/esp_wifi/src/phy_init.c @@ -640,8 +640,10 @@ static void __attribute((unused)) esp_phy_reduce_tx_power(esp_phy_init_data_t* i void esp_phy_load_cal_and_init(phy_rf_module_t module) { +#if CONFIG_IDF_TARGET_ESP32 char * phy_version = get_phy_version_str(); ESP_LOGI(TAG, "phy_version %s", phy_version); +#endif esp_phy_calibration_data_t* cal_data = (esp_phy_calibration_data_t*) calloc(sizeof(esp_phy_calibration_data_t), 1); From e67d29b4e8c12f9e250d480a1f650e6f33943e81 Mon Sep 17 00:00:00 2001 From: xiehang Date: Thu, 24 Dec 2020 11:56:18 +0800 Subject: [PATCH 7/7] esp_wifi: Update WiFi lib 1. Change wifi scan duration from 120ms to 100ms 2. Using deport reg instead of ahb 3. Revert to report specific reason code when receiving deauth during 4-way-handshark 4. Fix the bug that tx ampdu parameter is not from peer device 5. Faster WiFi station connect improvement, avoid 100ms passive scan 6. Add FCS failed packets filter 7.Update esp32 phy lib to v4660 8.Fix country code last byte to space instead of NULL 9.Fix softap cannot forward A-MSDU 10.Fix some typos in esp_wifi.h 11.Fix max tx power to 20dBm 12.Fix the issue that the esp_wifi_sta_get_ap_info can't get country 13.Add support for 802.1x sha256 auth key mode --- components/esp_wifi/include/esp_wifi_types.h | 1 + components/esp_wifi/lib | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/esp_wifi/include/esp_wifi_types.h b/components/esp_wifi/include/esp_wifi_types.h index fa7cb1393d..2fce8de8bc 100644 --- a/components/esp_wifi/include/esp_wifi_types.h +++ b/components/esp_wifi/include/esp_wifi_types.h @@ -377,6 +377,7 @@ typedef enum { #define WIFI_PROMIS_FILTER_MASK_MISC (1<<3) /**< filter the packets with type of WIFI_PKT_MISC */ #define WIFI_PROMIS_FILTER_MASK_DATA_MPDU (1<<4) /**< filter the MPDU which is a kind of WIFI_PKT_DATA */ #define WIFI_PROMIS_FILTER_MASK_DATA_AMPDU (1<<5) /**< filter the AMPDU which is a kind of WIFI_PKT_DATA */ +#define WIFI_PROMIS_FILTER_MASK_FCSFAIL (1<<6) /**< filter the FCS failed packets, do not open it in general */ #define WIFI_PROMIS_CTRL_FILTER_MASK_ALL (0xFF800000) /**< filter all control packets */ #define WIFI_PROMIS_CTRL_FILTER_MASK_WRAPPER (1<<23) /**< filter the control packets with subtype of Control Wrapper */ diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index c13860b4f0..db2262e3bc 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit c13860b4f07fbe35e25fc7807b1f74d7c19ed9a2 +Subproject commit db2262e3bc6e7639afd4a97c73d69abb7c25a95b