Skip to content

Commit a18ef41

Browse files
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: openwrt/openwrt#21291 Signed-off-by: Nick Hainke <[email protected]>
1 parent 436c9af commit a18ef41

File tree

1 file changed

+9
-1
lines changed
  • package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless

1 file changed

+9
-1
lines changed

package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,15 @@ function setup() {
294294
if (fs.access('/usr/sbin/hostapd', 'x'))
295295
hostapd.setup(data);
296296

297-
system(`ucode /usr/share/hostap/wdev.uc ${data.phy}${data.phy_suffix} set_config '${printf("%J", wdev_data)}' ${join(' ', active_ifnames)}`);
297+
for (let ifname in active_ifnames) {
298+
if (!wdev_data[ifname])
299+
continue;
300+
301+
let if_config = {
302+
[ifname]: wdev_data[ifname]
303+
};
304+
system(`ucode /usr/share/hostap/wdev.uc ${data.phy}${data.phy_suffix} set_config '${if_config}'`);
305+
}
298306

299307
if (length(supplicant_data) > 0)
300308
supplicant.start(data);

0 commit comments

Comments
 (0)