From df493faf12c4124732beea63863d42536a265359 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 11 Nov 2013 22:03:25 +0000 Subject: [PATCH] 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 SVN-Revision: 38759 --- .../broadcom-wl/files/lib/wifi/broadcom.sh | 10 ++++- package/kernel/broadcom-wl/src/wlc.c | 45 +++++++++++++++++++ 2 files changed, 53 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 <