[wifi] Place ap_ before the byte fields so they pack after it (#20138)

This commit is contained in:
J. Nick Koston
2026-10-05 12:02:40 +13:00
committed by GitHub
parent 9b83f37b78
commit c4aa8fa9c5
+3 -3
View File
@@ -874,9 +874,6 @@ class WiFiComponent final : public Component {
#ifdef WIFI_SCAN_RESULTS_LOCK_ENABLED
Mutex scan_result_lock_;
#endif
#ifdef USE_WIFI_AP
WiFiAP ap_;
#endif
#ifdef USE_WIFI_IP_STATE_LISTENERS
StaticVector<WiFiIPStateListener *, ESPHOME_WIFI_IP_STATE_LISTENERS> ip_state_listeners_;
#endif
@@ -924,6 +921,9 @@ class WiFiComponent final : public Component {
uint32_t roaming_scan_end_{0}; // Timestamp when last roaming scan completed
#ifdef USE_WIFI_AP
uint32_t ap_timeout_{90000}; // Keep in sync with DEFAULT_AP_TIMEOUT in __init__.py
// WiFiAP is byte aligned unless manual IP or EAP is enabled; placed before the
// 1-byte members so they pack into its trailing bytes instead of padding after it
WiFiAP ap_;
#endif
// 1-byte enums and integers