]> granicus.if.org Git - esp-idf/commitdiff
Wifi: bug fix of may connect to wrong AP in all channel scan
authorDeng Xin <dengxin@espressif.com>
Fri, 20 Jul 2018 12:30:29 +0000 (20:30 +0800)
committerDeng Xin <dengxin@espressif.com>
Mon, 6 Aug 2018 11:54:24 +0000 (19:54 +0800)
1. enable threshold in all channel scan
2. bug fix of may connect to an open AP even set password in all channel scan

components/esp32/include/esp_wifi_types.h
components/esp32/lib

index 6bd16162154cfebe9e7a9efd349767732c7376ea..8d331155d383c8410259958ff56c0c361240616d 100644 (file)
@@ -186,6 +186,8 @@ typedef struct {
     wifi_auth_mode_t    authmode;         /**< The weakest authmode to accept in the fast scan mode */
 }wifi_fast_scan_threshold_t;
 
+typedef wifi_fast_scan_threshold_t wifi_scan_threshold_t;    /**< wifi_fast_scan_threshold_t only used in fast scan mode once, now it enabled in all channel scan, the wifi_fast_scan_threshold_t will be remove in version 4.0 */
+
 typedef enum {
     WIFI_PS_NONE,        /**< No power save */
     WIFI_PS_MIN_MODEM,   /**< Minimum modem power saving. In this mode, station wakes up to receive beacon every DTIM period */
@@ -226,7 +228,7 @@ typedef struct {
     uint8_t channel;       /**< channel of target AP. Set to 1~13 to scan starting from the specified channel before connecting to AP. If the channel of AP is unknown, set it to 0.*/
     uint16_t listen_interval;   /**< Listen interval for ESP32 station to receive beacon when WIFI_PS_MAX_MODEM is set. Units: AP beacon intervals. Defaults to 3 if set to 0. */
     wifi_sort_method_t sort_method;    /**< sort the connect AP in the list by rssi or security mode */
-    wifi_fast_scan_threshold_t  threshold;     /**< When scan_method is set to WIFI_FAST_SCAN, only APs which have an auth mode that is more secure than the selected auth mode and a signal stronger than the minimum RSSI will be used. */
+    wifi_scan_threshold_t  threshold;     /**< When scan_method is set, only APs which have an auth mode that is more secure than the selected auth mode and a signal stronger than the minimum RSSI will be used. */
 } wifi_sta_config_t;
 
 /** @brief Configuration data for ESP32 AP or STA.
index decb309e65b8113dc55d3ca129dfde815323a457..ecd7e6ee23da07f9ee86c31f4d1b7ebe2b3e365a 160000 (submodule)
@@ -1 +1 @@
-Subproject commit decb309e65b8113dc55d3ca129dfde815323a457
+Subproject commit ecd7e6ee23da07f9ee86c31f4d1b7ebe2b3e365a