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>
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,
...network_config_attr,
device: TYPE_STRING,
mode: TYPE_STRING,
+ radio_macaddr: TYPE_ARRAY,
},
station: {
iface: TYPE_STRING,