Selaa lähdekoodia

esp32c3: Universal MAC Address strategy for ESP32C3 is the same as for ESP32 (4 reserved MAC-addresses per device)

KonstantinKondrashov 5 vuotta sitten
vanhempi
sitoutus
63a4dbb8d2
1 muutettua tiedostoa jossa 11 lisäystä ja 15 poistoa
  1. 11 15
      components/esp32c3/Kconfig

+ 11 - 15
components/esp32c3/Kconfig

@@ -25,44 +25,40 @@ menu "ESP32C3-Specific"
 
 
     choice ESP32C3_UNIVERSAL_MAC_ADDRESSES
     choice ESP32C3_UNIVERSAL_MAC_ADDRESSES
         bool "Number of universally administered (by IEEE) MAC address"
         bool "Number of universally administered (by IEEE) MAC address"
-        default ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO
+        default ESP32C3_UNIVERSAL_MAC_ADDRESSES_FOUR
         help
         help
             Configure the number of universally administered (by IEEE) MAC addresses.
             Configure the number of universally administered (by IEEE) MAC addresses.
             During initialization, MAC addresses for each network interface are generated or derived from a
             During initialization, MAC addresses for each network interface are generated or derived from a
             single base MAC address.
             single base MAC address.
-            - If the number of universal MAC addresses is Three, all interfaces (WiFi station, WiFi softap
-            and Bluetooth) receive a universally administered MAC address. They are generated sequentially by adding
-            0, 1 and 2 (respectively) to the final octet of the base MAC address. The remaining one interface
-            (Ethernet) receives local MAC addresses which is derived from the universal WiFi softap MAC.
-            - If the number of universal MAC addresses is Two, only two interfaces (WiFi station and Bluetooth)
+            If the number of universal MAC addresses is four, all four interfaces (WiFi station, WiFi softap,
+            Bluetooth and Ethernet) receive a universally administered MAC address. These are generated
+            sequentially by adding 0, 1, 2 and 3 (respectively) to the final octet of the base MAC address.
+            If the number of universal MAC addresses is two, only two interfaces (WiFi station and Bluetooth)
             receive a universally administered MAC address. These are generated sequentially by adding 0
             receive a universally administered MAC address. These are generated sequentially by adding 0
             and 1 (respectively) to the base MAC address. The remaining two interfaces (WiFi softap and Ethernet)
             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
             receive local MAC addresses. These are derived from the universal WiFi station and Bluetooth MAC
             addresses, respectively.
             addresses, respectively.
             When using the default (Espressif-assigned) base MAC address, either setting can be used. When using
             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
             a custom universal MAC address range, the correct setting will depend on the allocation of MAC
-            addresses in this range (either 2 or 3 per device.)
+            addresses in this range (either 2 or 4 per device.)
 
 
         config ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO
         config ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO
             bool "Two"
             bool "Two"
             select ESP_MAC_ADDR_UNIVERSE_WIFI_STA
             select ESP_MAC_ADDR_UNIVERSE_WIFI_STA
             select ESP_MAC_ADDR_UNIVERSE_BT
             select ESP_MAC_ADDR_UNIVERSE_BT
-        config ESP32C3_UNIVERSAL_MAC_ADDRESSES_THREE
-            bool "Three"
+
+        config ESP32C3_UNIVERSAL_MAC_ADDRESSES_FOUR
+            bool "Four"
             select ESP_MAC_ADDR_UNIVERSE_WIFI_STA
             select ESP_MAC_ADDR_UNIVERSE_WIFI_STA
             select ESP_MAC_ADDR_UNIVERSE_WIFI_AP
             select ESP_MAC_ADDR_UNIVERSE_WIFI_AP
             select ESP_MAC_ADDR_UNIVERSE_BT
             select ESP_MAC_ADDR_UNIVERSE_BT
+            select ESP_MAC_ADDR_UNIVERSE_ETH
     endchoice
     endchoice
 
 
     config ESP32C3_UNIVERSAL_MAC_ADDRESSES
     config ESP32C3_UNIVERSAL_MAC_ADDRESSES
         int
         int
         default 2 if ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO
         default 2 if ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO
-        default 3 if ESP32C3_UNIVERSAL_MAC_ADDRESSES_THREE
-
-    config ESP_MAC_ADDR_UNIVERSE_BT_OFFSET
-        int
-        default 2 if ESP32C3_UNIVERSAL_MAC_ADDRESSES_THREE
-        default 1 if ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO
+        default 4 if ESP32C3_UNIVERSAL_MAC_ADDRESSES_FOUR
 
 
     config ESP32C3_DEBUG_OCDAWARE
     config ESP32C3_DEBUG_OCDAWARE
         bool "Make exception and panic handlers JTAG/OCD aware"
         bool "Make exception and panic handlers JTAG/OCD aware"