[openwrt/openwrt] wifi-scripts: allow configuring per-radio macaddr in shared/mlo wifi-iface
LEDE Commits
lede-commits at lists.infradead.org
Thu Aug 28 01:44:55 PDT 2025
nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f43bf55b412dbc89c30eea27fdf127b2ca4eb110
commit f43bf55b412dbc89c30eea27fdf127b2ca4eb110
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Aug 28 10:42:43 2025 +0200
wifi-scripts: allow configuring per-radio macaddr in shared/mlo wifi-iface
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 at nbd.name>
---
.../network/config/wifi-scripts/files/lib/netifd/wireless.uc | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
index 2103c9c369..1180b72347 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
@@ -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,
More information about the lede-commits
mailing list