Wifi: bug fix of may connect to wrong AP in all channel scan

1. enable threshold in all channel scan
2. bug fix of may connect to an open AP even set password in all channel scan
This commit is contained in:
Deng Xin 2018-07-20 20:30:29 +08:00 committed by Liu Zhi Fu
parent 863131435f
commit 71e4d231c6
2 changed files with 4 additions and 2 deletions

View File

@ -173,6 +173,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_MODEM, /**< Modem power save */
@ -209,7 +211,7 @@ typedef struct {
uint8_t bssid[6]; /**< MAC address of target AP*/
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.*/
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.

@ -1 +1 @@
Subproject commit 66d20f0a5e2b103e535c4ad2a737b7f11c90ed4d
Subproject commit 69ef74a88d256f1687d6d72cb3e64ebc79a73cb1