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 <cursoragent@cursor.com>
(cherry picked from commit f18f3814cc)
This commit is contained in:
Jack
2026-07-06 15:20:44 +08:00
parent 6fa5704eda
commit c7434cc9d9

View File

@@ -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"