If the virtual interface is defined before the device itself in the UCI
configuration, it is not spawned.
The patch allows to spawn virtual interfaces regardless of the order.
---
package/base-files/files/sbin/wifi | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/package/base-files/files/sbin/wifi
b/package/base-files/files/sbin/wifi
index e2dd0a3..0b25503 100755
--- a/package/base-files/files/sbin/wifi
+++ b/package/base-files/files/sbin/wifi
@@ -164,6 +164,7 @@ scan_wifi() {
case "$type" in
wifi-device)
append DEVICES "$section"
+ config_get vifs "$CONFIG_SECTION" vifs ||
config_set "$section" vifs ""
config_set "$section" ht_capab ""
;;
@@ -175,8 +176,12 @@ scan_wifi() {
wifi-iface)
config_get device "$CONFIG_SECTION" device
config_get vifs "$device" vifs
- append vifs "$CONFIG_SECTION"
- config_set "$device" vifs "$vifs"
+ expr match "$vifs" \
+ ".*$CONFIG_SECTION.*" > /dev/null ||
+ {
+ append vifs "$CONFIG_SECTION"
+ config_set "$device" vifs "$vifs"
+ }
;;
esac
}
--
1.5.4.3
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel