diff --git a/esphome/components/wifi/wifi_component.h b/esphome/components/wifi/wifi_component.h index d92a7faeb3a..2ef53f69466 100644 --- a/esphome/components/wifi/wifi_component.h +++ b/esphome/components/wifi/wifi_component.h @@ -58,12 +58,6 @@ static constexpr int8_t WIFI_RSSI_DISCONNECTED = -127; /// Buffer size for SSID (IEEE 802.11 max 32 bytes + null terminator) static constexpr size_t SSID_BUFFER_SIZE = 33; -#ifdef USE_ESP8266 -/// Special disconnect reason for authmode downgrade (CVE-2020-12638 mitigation) -/// Not a real WiFi reason code - used internally for deferred logging -static constexpr uint8_t WIFI_DISCONNECT_REASON_AUTHMODE_DOWNGRADE = 254; -#endif - struct SavedWifiSettings { char ssid[33]; char password[65]; diff --git a/esphome/components/wifi/wifi_component_esp8266.cpp b/esphome/components/wifi/wifi_component_esp8266.cpp index 5026fbcb94f..3ae3b69174d 100644 --- a/esphome/components/wifi/wifi_component_esp8266.cpp +++ b/esphome/components/wifi/wifi_component_esp8266.cpp @@ -42,6 +42,10 @@ namespace esphome::wifi { static const char *const TAG = "wifi_esp8266"; +/// Special disconnect reason for authmode downgrade (CVE-2020-12638 mitigation) +/// Not a real WiFi reason code - used internally for deferred logging +static constexpr uint8_t WIFI_DISCONNECT_REASON_AUTHMODE_DOWNGRADE = 254; + static bool s_sta_connected = false; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables) static bool s_sta_got_ip = false; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables) static bool s_sta_connect_not_found = false; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)