From 431983a0916423042e4d9c19669e3ddc19fb913f Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 6 Jul 2026 18:08:27 +0800 Subject: [PATCH] fix(esp_hw_support): use one universal MAC address for esp32h2/esp32h21/esp32h4 ESP32-H2/H21/H4 only provide a single universally administered MAC address in eFuse (MAC_FACTORY), so switch their UNIVERSAL_MAC_ADDRESSES Kconfig from "Two" to "One" to match the hardware allocation. This is a functional no-op for MAC generation: the BT offset is only applied when SOC_WIFI_SUPPORTED, and these chips have no Wi-Fi, so Bluetooth already reuses the base MAC as-is; the IEEE 802.154 EUI-64 is derived from the base MAC and MAC_EXT regardless. The only change is the (otherwise unused) ESP_MAC_UNIVERSAL_MAC_ADDRESSES int value going from 2 to 1. Co-authored-by: Cursor --- components/esp_hw_support/port/esp32h2/Kconfig.mac | 10 +++++----- components/esp_hw_support/port/esp32h21/Kconfig.mac | 10 +++++----- components/esp_hw_support/port/esp32h4/Kconfig.mac | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/components/esp_hw_support/port/esp32h2/Kconfig.mac b/components/esp_hw_support/port/esp32h2/Kconfig.mac index 48c69f0fa08..cc4cd68ae9c 100644 --- a/components/esp_hw_support/port/esp32h2/Kconfig.mac +++ b/components/esp_hw_support/port/esp32h2/Kconfig.mac @@ -1,18 +1,18 @@ choice ESP32H2_UNIVERSAL_MAC_ADDRESSES bool "Number of universally administered (by IEEE) MAC address" - default ESP32H2_UNIVERSAL_MAC_ADDRESSES_TWO + default ESP32H2_UNIVERSAL_MAC_ADDRESSES_ONE 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 single base MAC address. - config ESP32H2_UNIVERSAL_MAC_ADDRESSES_TWO - bool "Two" - select ESP_MAC_UNIVERSAL_MAC_ADDRESSES_TWO + config ESP32H2_UNIVERSAL_MAC_ADDRESSES_ONE + bool "One" + select ESP_MAC_UNIVERSAL_MAC_ADDRESSES_ONE select ESP_MAC_ADDR_UNIVERSE_IEEE802154 select ESP_MAC_ADDR_UNIVERSE_BT endchoice config ESP32H2_UNIVERSAL_MAC_ADDRESSES int - default 2 if ESP32H2_UNIVERSAL_MAC_ADDRESSES_TWO + default 1 if ESP32H2_UNIVERSAL_MAC_ADDRESSES_ONE diff --git a/components/esp_hw_support/port/esp32h21/Kconfig.mac b/components/esp_hw_support/port/esp32h21/Kconfig.mac index 40fd8709b0a..a1a0795cc1e 100644 --- a/components/esp_hw_support/port/esp32h21/Kconfig.mac +++ b/components/esp_hw_support/port/esp32h21/Kconfig.mac @@ -1,18 +1,18 @@ choice ESP32H21_UNIVERSAL_MAC_ADDRESSES bool "Number of universally administered (by IEEE) MAC address" - default ESP32H21_UNIVERSAL_MAC_ADDRESSES_TWO + default ESP32H21_UNIVERSAL_MAC_ADDRESSES_ONE 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 single base MAC address. - config ESP32H21_UNIVERSAL_MAC_ADDRESSES_TWO - bool "Two" - select ESP_MAC_UNIVERSAL_MAC_ADDRESSES_TWO + config ESP32H21_UNIVERSAL_MAC_ADDRESSES_ONE + bool "One" + select ESP_MAC_UNIVERSAL_MAC_ADDRESSES_ONE select ESP_MAC_ADDR_UNIVERSE_IEEE802154 select ESP_MAC_ADDR_UNIVERSE_BT endchoice config ESP32H21_UNIVERSAL_MAC_ADDRESSES int - default 2 if ESP32H21_UNIVERSAL_MAC_ADDRESSES_TWO + default 1 if ESP32H21_UNIVERSAL_MAC_ADDRESSES_ONE diff --git a/components/esp_hw_support/port/esp32h4/Kconfig.mac b/components/esp_hw_support/port/esp32h4/Kconfig.mac index 699af307712..24371cb6303 100644 --- a/components/esp_hw_support/port/esp32h4/Kconfig.mac +++ b/components/esp_hw_support/port/esp32h4/Kconfig.mac @@ -1,18 +1,18 @@ choice ESP32H4_UNIVERSAL_MAC_ADDRESSES bool "Number of universally administered (by IEEE) MAC address" - default ESP32H4_UNIVERSAL_MAC_ADDRESSES_TWO + default ESP32H4_UNIVERSAL_MAC_ADDRESSES_ONE 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 single base MAC address. - config ESP32H4_UNIVERSAL_MAC_ADDRESSES_TWO - bool "Two" - select ESP_MAC_UNIVERSAL_MAC_ADDRESSES_TWO + config ESP32H4_UNIVERSAL_MAC_ADDRESSES_ONE + bool "One" + select ESP_MAC_UNIVERSAL_MAC_ADDRESSES_ONE select ESP_MAC_ADDR_UNIVERSE_IEEE802154 select ESP_MAC_ADDR_UNIVERSE_BT endchoice config ESP32H4_UNIVERSAL_MAC_ADDRESSES int - default 2 if ESP32H4_UNIVERSAL_MAC_ADDRESSES_TWO + default 1 if ESP32H4_UNIVERSAL_MAC_ADDRESSES_ONE