diff options
author | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-11-11 22:03:25 +0000 |
---|---|---|
committer | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-11-11 22:03:25 +0000 |
commit | c7e8ffdc37befface9281620f029ecf6eece400f (patch) | |
tree | 4311fb94115ed0be393daa6a3245ff5b6594c252 /package/kernel/broadcom-wl/files | |
parent | 43fe8f9846ed7ed2b5902326ff6e6f7476aac5c1 (diff) |
broadcom-wl: support more virtual interfaces
Read the number of virtual interfaces to support from the device
capabilities; as some newer devices can support up to 16.
Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38759 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/broadcom-wl/files')
-rw-r--r-- | package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh index 9416f77b23..614db0cf0b 100644 --- a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh +++ b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh @@ -108,12 +108,14 @@ disable_broadcom() { # make sure all of the devices are disabled in the driver local ifdown= - local vif + local bssmax=$(wlc ifname "$device" bssmax) + local vif=$((${bssmax:-4} - 1)) append ifdown "down" "$N" append ifdown "wds none" "$N" - for vif in 3 2 1 0; do + while [ $vif -ge 0 ]; do append ifdown "vif $vif" "$N" append ifdown "enabled 0" "$N" + vif=$(($vif - 1)) done wlc ifname "$device" stdin <<EOF @@ -209,8 +211,12 @@ enable_broadcom() { local nas="$(which nas)" local if_pre_up if_up nas_cmd local vif vif_pre_up vif_post_up vif_do_up vif_txpower + local bssmax=$(wlc ifname "$device" bssmax) + bssmax=${bssmax:-4} for vif in $vifs; do + [ $_c -ge $bssmax ] && break + config_get vif_txpower "$vif" txpower local mode |