mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-28 03:37:17 +01:00
wifi-scripts: allow configuring per-radio macaddr in shared/mlo wifi-iface
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
When a wifi-iface section is used either for multiple vifs or MLD links, make it possible to configure the per-radio/link macaddr. When MLO is enabled, the main macaddr is used for the MLD interface. Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
6fbf6d0cfd
commit
f43bf55b41
1 changed files with 12 additions and 0 deletions
|
|
@ -128,6 +128,17 @@ function config_init(uci)
|
|||
config.mode = "link";
|
||||
config.radios = radios;
|
||||
|
||||
if (dev_name != dev_names[0])
|
||||
delete config.macaddr;
|
||||
if (dev_name != wdev.mlo_name && config.radio_macaddr) {
|
||||
let idx = index(dev_names, dev_name);
|
||||
if (mlo_vif)
|
||||
idx--;
|
||||
let macaddr = idx >= 0 ? config.radio_macaddr[idx] : null;
|
||||
if (macaddr)
|
||||
config.macaddr = macaddr;
|
||||
}
|
||||
|
||||
let vif = {
|
||||
name, config,
|
||||
device: dev_name,
|
||||
|
|
@ -310,6 +321,7 @@ const default_config_attr = {
|
|||
...network_config_attr,
|
||||
device: TYPE_STRING,
|
||||
mode: TYPE_STRING,
|
||||
radio_macaddr: TYPE_ARRAY,
|
||||
},
|
||||
station: {
|
||||
iface: TYPE_STRING,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue