X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/cbf4a0f140041ddb1647e4ad742ca946e883a2d6..fcb4e88f44ae7fc0b4e8af1cfb5b88216acfa760:/package/madwifi/files/lib/wifi/madwifi.sh diff --git a/package/madwifi/files/lib/wifi/madwifi.sh b/package/madwifi/files/lib/wifi/madwifi.sh index 21a5cf743..93e68f51e 100755 --- a/package/madwifi/files/lib/wifi/madwifi.sh +++ b/package/madwifi/files/lib/wifi/madwifi.sh @@ -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}" @@ -303,10 +305,10 @@ enable_atheros() { config_get_bool comp "$vif" compression 0 iwpriv "$ifname" compression "$comp" >/dev/null 2>&1 - config_get_bool minrate "$vif" minrate + config_get minrate "$vif" minrate [ -n "$minrate" ] && iwpriv "$ifname" minrate "$minrate" - config_get_bool maxrate "$vif" maxrate + config_get maxrate "$vif" maxrate [ -n "$maxrate" ] && iwpriv "$ifname" maxrate "$maxrate" config_get_bool burst "$vif" bursting @@ -366,7 +368,7 @@ enable_atheros() { config_get ssid "$vif" ssid [ -n "$ssid" ] && { iwconfig "$ifname" essid on - iwconfig "$ifname" essid "$ssid" + iwconfig "$ifname" essid ${ssid:+-- }"$ssid" } set_wifi_up "$vif" "$ifname"