From c7434cc9d96afc43f10b77b688301c0316b0a2fa Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 6 Jul 2026 15:20:44 +0800 Subject: [PATCH] fix(esp32s31): default UNIVERSAL_MAC_ADDRESSES to Two ESP32-S31 only provides two universally administered MAC addresses in eFuse. The previous default of "Four" led to WiFi softap and Ethernet consuming global MAC slots (base+1/+3) that do not exist on this chip and could collide with the Bluetooth MAC. Switch the default to "Two" so Softap and Ethernet fall back to locally administered MACs derived from the WiFi station and Bluetooth MACs. The "Four" option is retained for customers who override the base MAC with a custom range in which four universally administered MAC addresses are allocated per device; the help text now documents this constraint. Co-authored-by: Cursor (cherry picked from commit f18f3814ccefc6ba9d24f113c86bd531a88d443a) --- components/esp_hw_support/port/esp32s31/Kconfig.mac | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/esp_hw_support/port/esp32s31/Kconfig.mac b/components/esp_hw_support/port/esp32s31/Kconfig.mac index 4bf383285fd..7162d3d9a7f 100644 --- a/components/esp_hw_support/port/esp32s31/Kconfig.mac +++ b/components/esp_hw_support/port/esp32s31/Kconfig.mac @@ -1,6 +1,6 @@ choice ESP32S31_UNIVERSAL_MAC_ADDRESSES bool "Number of universally administered (by IEEE) MAC address" - default ESP32S31_UNIVERSAL_MAC_ADDRESSES_FOUR + default ESP32S31_UNIVERSAL_MAC_ADDRESSES_TWO help Configure the number of universally administered (by IEEE) MAC addresses. During initialization, MAC addresses for each network interface are generated or derived from a @@ -13,9 +13,9 @@ choice ESP32S31_UNIVERSAL_MAC_ADDRESSES and 1 (respectively) to the base MAC address. The remaining two interfaces (WiFi softap and Ethernet) receive local MAC addresses. These are derived from the universal WiFi station and Bluetooth MAC addresses, respectively. - When using the default (Espressif-assigned) base MAC address, either setting can be used. When using - a custom universal MAC address range, the correct setting will depend on the allocation of MAC - addresses in this range (either 2 or 4 per device.) + ESP32-S31 only provides two universally administered MAC addresses in eFuse, so "Two" is the + recommended and default setting. "Four" is only intended for use with a custom base MAC range + where four universally administered MAC addresses are allocated per device. config ESP32S31_UNIVERSAL_MAC_ADDRESSES_TWO bool "Two"