summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Hainke2025-12-25 17:41:10 +0000
committerNick Hainke2025-12-27 11:20:17 +0000
commita32c5c69dcf3d95ee0fafb415d2f4e152bf15469 (patch)
treed75757061e06cc1269291dc04affeecd49d42aa1
parentd23f61445135428065eea0bef340eb4bf242d5be (diff)
downloadopenwrt-a32c5c69dcf3d95ee0fafb415d2f4e152bf15469.tar.gz
wifi-scripts: fix wdev fallback for mesh interfaces
The previous wdev.uc invocation failed for mesh interfaces. Rewrite it as a loop so the mesh interface is created correctly when no wpa_supplicant mesh support is installed. Link: https://github.com/openwrt/openwrt/pull/21291 (cherry picked from commit a18ef412ae73b605a99c319e02bcff9a63b3bfa8) Link: https://github.com/openwrt/openwrt/pull/21301 Signed-off-by: Nick Hainke <vincent@systemli.org>
-rwxr-xr-xpackage/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh b/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh
index 8aba81436e..dcfdcd2cc8 100755
--- a/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh
+++ b/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh
@@ -294,7 +294,15 @@ function setup() {
if (fs.access('/usr/sbin/hostapd', 'x'))
hostapd.setup(data);
- system(`ucode /usr/share/hostap/wdev.uc ${data.phy}${data.phy_suffix} set_config '${printf("%J", wdev_data)}' ${join(' ', active_ifnames)}`);
+ for (let ifname in active_ifnames) {
+ if (!wdev_data[ifname])
+ continue;
+
+ let if_config = {
+ [ifname]: wdev_data[ifname]
+ };
+ system(`ucode /usr/share/hostap/wdev.uc ${data.phy}${data.phy_suffix} set_config '${if_config}'`);
+ }
if (length(supplicant_data) > 0)
supplicant.start(data);