瀏覽代碼

Merge branch 'bugfix/sta_set_extra_ies_for_open_AP_1' into 'master'

esp_wifi: STA set extra IEs for open AP

Closes IDFCI-1533

See merge request espressif/esp-idf!21360
Jiang Jiang Jian 3 年之前
父節點
當前提交
367abc1591
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c

+ 2 - 2
components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c

@@ -88,8 +88,6 @@ int  wpa_config_profile(uint8_t *bssid)
         wpa_set_profile(WPA_PROTO_RSN, esp_wifi_sta_get_prof_authmode_internal());
         wpa_set_profile(WPA_PROTO_RSN, esp_wifi_sta_get_prof_authmode_internal());
     } else if (esp_wifi_sta_prof_is_wapi_internal()) {
     } else if (esp_wifi_sta_prof_is_wapi_internal()) {
         wpa_set_profile(WPA_PROTO_WAPI, esp_wifi_sta_get_prof_authmode_internal());
         wpa_set_profile(WPA_PROTO_WAPI, esp_wifi_sta_get_prof_authmode_internal());
-    } else if (esp_wifi_sta_get_prof_authmode_internal() == NONE_AUTH) {
-        esp_set_assoc_ie((uint8_t *)bssid, NULL, 0, false);
     } else {
     } else {
         ret = -1;
         ret = -1;
     }
     }
@@ -198,6 +196,8 @@ int wpa_sta_connect(uint8_t *bssid)
             wpa_printf(MSG_DEBUG, "Rejecting bss, validation failed");
             wpa_printf(MSG_DEBUG, "Rejecting bss, validation failed");
             return ret;
             return ret;
         }
         }
+    } else if (esp_wifi_sta_get_prof_authmode_internal() == NONE_AUTH) {
+        esp_set_assoc_ie((uint8_t *)bssid, NULL, 0, false);
     }
     }
 
 
     return 0;
     return 0;