1# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
2# SPDX-License-Identifier: Apache-2.0
3
4if SOC_SERIES_ESP32
5
6choice ESP32_UNIVERSAL_MAC_ADDRESSES
7	bool "Number of universally administered (by IEEE) MAC address"
8	default ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR
9	help
10	  Configure the number of universally administered (by IEEE) MAC addresses.
11	  During initialization, MAC addresses for each network interface are generated or
12	  derived from a single base MAC address. If the number of universal MAC addresses is four,
13	  all four interfaces (WiFi station, WiFi softap, Bluetooth and Ethernet) receive a universally
14	  administered MAC address. These are generated sequentially by adding 0, 1, 2 and 3 (respectively)
15	  to the final octet of the base MAC address. If the number of universal MAC addresses is two,
16	  only two interfaces (WiFi station and Bluetooth) receive a universally administered MAC address.
17	  These are generated sequentially by adding 0 and 1 (respectively) to the base MAC address.
18	  The remaining two interfaces (WiFi softap and Ethernet) receive local MAC addresses.
19	  These are derived from the universal WiFi station and Bluetooth MAC addresses, respectively.
20	  When using the default (Espressif-assigned) base MAC address, either setting can be used.
21	  When using a custom universal MAC address range, the correct setting will depend on the
22	  allocation of MAC addresses in this range (either 2 or 4 per device.)
23
24config ESP32_UNIVERSAL_MAC_ADDRESSES_TWO
25	bool "Two"
26	select ESP_MAC_UNIVERSAL_MAC_ADDRESSES_TWO
27	select ESP_MAC_ADDR_UNIVERSE_WIFI_STA
28	select ESP_MAC_ADDR_UNIVERSE_BT
29
30config ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR
31	bool "Four"
32	select ESP_MAC_UNIVERSAL_MAC_ADDRESSES_FOUR
33	select ESP_MAC_ADDR_UNIVERSE_WIFI_STA
34	select ESP_MAC_ADDR_UNIVERSE_WIFI_AP
35	select ESP_MAC_ADDR_UNIVERSE_BT
36	select ESP_MAC_ADDR_UNIVERSE_ETH
37
38endchoice # ESP32_UNIVERSAL_MAC_ADDRESSES
39
40config ESP32_UNIVERSAL_MAC_ADDRESSES
41	int
42	default 2 if ESP32_UNIVERSAL_MAC_ADDRESSES_TWO
43	default 4 if ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR
44
45endif # SOC_SERIES_ESP32
46