From da55eba96822dd4e1305cddc193a2c7aab673bd6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 7 Sep 2023 21:45:11 +0200 Subject: [PATCH] mac80211: add support for configuring number of globally allocated MAC addresses When a device has more than one reserved mac address, they can be used for virtual interfaces without the local bit in the first byte Signed-off-by: Felix Fietkau --- .../kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 1d7f733cad..91728a6e56 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -27,6 +27,7 @@ drv_mac80211_init_device_config() { config_add_string distance config_add_int beacon_int chanbw frag rts config_add_int rxantenna txantenna txpower min_tx_power + config_add_int num_global_macaddr config_add_boolean noscan ht_coex acs_exclude_dfs background_radar config_add_array ht_capab config_add_array channels @@ -533,7 +534,7 @@ mac80211_generate_mac() { local phy="$1" local id="${macidx:-0}" - wdev_tool "$phy" get_macaddr id=$id + wdev_tool "$phy" get_macaddr id=$id num_global=$num_global_macaddr } get_board_phy_name() ( @@ -1040,7 +1041,8 @@ drv_mac80211_setup() { country chanbw distance \ txpower \ rxantenna txantenna \ - frag rts beacon_int:100 htmode + frag rts beacon_int:100 htmode \ + num_global_macaddr:1 json_get_values basic_rate_list basic_rate json_get_values scan_list scan_list json_select .. -- 2.30.2