madwifi: introduce "disabled" option for wifi-iface section to shutdown single networ...
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 8 Sep 2011 23:31:42 +0000 (23:31 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 8 Sep 2011 23:31:42 +0000 (23:31 +0000)
SVN-Revision: 28199

package/madwifi/files/lib/wifi/madwifi.sh

index bd93d47369e81dfb1239bd8273f71a23ac92e8c4..93e68f51e8b91ba7ee7feb2ab2139f7bd20c56ce 100755 (executable)
@@ -28,13 +28,15 @@ find_atheros_phy() {
 scan_atheros() {
        local device="$1"
        local wds
-       local adhoc ahdemo sta ap monitor
+       local adhoc ahdemo sta ap monitor disabled
 
        [ ${device%[0-9]} = "wifi" ] && config_set "$device" phy "$device"
        
        config_get vifs "$device" vifs
        for vif in $vifs; do
-       
+               config_get_bool disabled "$vif" disabled 0
+               [ $disabled = 0 ] || continue
+
                config_get ifname "$vif" ifname
                config_set "$vif" ifname "${ifname:-ath}"