diff --git a/components/esp8266/include/esp_wifi.h b/components/esp8266/include/esp_wifi.h index ab156f62..e88defac 100644 --- a/components/esp8266/include/esp_wifi.h +++ b/components/esp8266/include/esp_wifi.h @@ -90,9 +90,6 @@ extern "C" { #define ESP_WIFI_PARAM_USE_NVS 0 -#define WIFI_PROTOCAL_11B 1 -#define WIFI_PROTOCAL_11G 2 -#define WIFI_PROTOCAL_11N 4 /** * @brief WiFi stack configuration parameters passed to esp_wifi_init call. */ diff --git a/components/mqtt/esp-mqtt/examples/emitter-client/main/app_main.c b/components/mqtt/esp-mqtt/examples/emitter-client/main/app_main.c index f8e64817..7b7197c0 100755 --- a/components/mqtt/esp-mqtt/examples/emitter-client/main/app_main.c +++ b/components/mqtt/esp-mqtt/examples/emitter-client/main/app_main.c @@ -44,7 +44,7 @@ static esp_err_t wifi_event_handler(void *ctx, system_event_t *event) ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason); if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) { /*Switch to 802.11 bgn mode */ - esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N); + esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N); } esp_wifi_connect(); xEventGroupClearBits(wifi_event_group, CONNECTED_BIT); diff --git a/examples/common_components/protocol_examples_common/connect.c b/examples/common_components/protocol_examples_common/connect.c index fd348c8a..8d8b2bb4 100644 --- a/examples/common_components/protocol_examples_common/connect.c +++ b/examples/common_components/protocol_examples_common/connect.c @@ -50,7 +50,7 @@ static void on_wifi_disconnect(void *arg, esp_event_base_t event_base, ESP_LOGI(TAG, "Wi-Fi disconnected, trying to reconnect..."); if (event->reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) { /*Switch to 802.11 bgn mode */ - esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N); + esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N); } ESP_ERROR_CHECK(esp_wifi_connect()); } diff --git a/examples/provisioning/custom_config/main/app_prov.c b/examples/provisioning/custom_config/main/app_prov.c index ad7253e3..64403ce5 100644 --- a/examples/provisioning/custom_config/main/app_prov.c +++ b/examples/provisioning/custom_config/main/app_prov.c @@ -217,7 +217,7 @@ esp_err_t app_prov_event_handler(void *ctx, system_event_t *event) g_prov->wifi_state = WIFI_PROV_STA_CONNECTING; if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) { /*Switch to 802.11 bgn mode */ - esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N); + esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N); } esp_wifi_connect(); } diff --git a/examples/provisioning/softap_prov/main/app_prov.c b/examples/provisioning/softap_prov/main/app_prov.c index 864fe7fc..495c0899 100644 --- a/examples/provisioning/softap_prov/main/app_prov.c +++ b/examples/provisioning/softap_prov/main/app_prov.c @@ -200,7 +200,7 @@ esp_err_t app_prov_event_handler(void *ctx, system_event_t *event) default: if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) { /*Switch to 802.11 bgn mode */ - esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N); + esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N); } /* If none of the expected reasons, * retry connecting to host SSID */ diff --git a/examples/system/console/main/cmd_wifi.c b/examples/system/console/main/cmd_wifi.c index c60f1e81..8233203d 100644 --- a/examples/system/console/main/cmd_wifi.c +++ b/examples/system/console/main/cmd_wifi.c @@ -36,7 +36,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event) ESP_LOGI(__func__, "Disconnect reason : %d", info->disconnected.reason); if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) { /*Switch to 802.11 bgn mode */ - esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N); + esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N); } esp_wifi_connect(); xEventGroupClearBits(wifi_event_group, CONNECTED_BIT); diff --git a/examples/wifi/smart_config/main/smartconfig_main.c b/examples/wifi/smart_config/main/smartconfig_main.c index 52c2f22b..d18d882e 100644 --- a/examples/wifi/smart_config/main/smartconfig_main.c +++ b/examples/wifi/smart_config/main/smartconfig_main.c @@ -41,7 +41,7 @@ static void on_wifi_disconnect(void *arg, esp_event_base_t event_base, ESP_LOGI(TAG, "Wi-Fi disconnected, trying to reconnect..."); if (event->reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) { /*Switch to 802.11 bgn mode */ - esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N); + esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N); } ESP_ERROR_CHECK(esp_wifi_connect()); } diff --git a/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c b/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c index 1c9eb3db..ac6ec782 100644 --- a/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c +++ b/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c @@ -87,7 +87,7 @@ static void event_handler(void* arg, esp_event_base_t event_base, if (event->reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) { /*Switch to 802.11 bgn mode */ - esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N); + esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N); } esp_wifi_connect(); xEventGroupClearBits(wifi_event_group, WIFI_CONNECTED_BIT); diff --git a/examples/wifi/wps/main/wps.c b/examples/wifi/wps/main/wps.c index 6ab5a813..f5cf8d46 100644 --- a/examples/wifi/wps/main/wps.c +++ b/examples/wifi/wps/main/wps.c @@ -52,7 +52,7 @@ static void wifi_event_handler(void* arg, esp_event_base_t event_base, ESP_LOGI(TAG, "WIFI_EVENT_STA_DISCONNECTED"); if (event->reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) { /*Switch to 802.11 bgn mode */ - esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N); + esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N); } ESP_ERROR_CHECK(esp_wifi_connect()); }