broadcom-wl: only use mssid if necessary (fixes spurious error messages on older hw)
authorFelix Fietkau <nbd@openwrt.org>
Sun, 28 Sep 2008 18:30:23 +0000 (18:30 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 28 Sep 2008 18:30:23 +0000 (18:30 +0000)
SVN-Revision: 12769

package/broadcom-wl/files/lib/wifi/broadcom.sh

index 5ea82a1b8f13753d6664bc005bbcbc51f01afc01..ece3a6961355e379a1ab1e92035d7079b7529ac6 100644 (file)
@@ -5,10 +5,12 @@ scan_broadcom() {
        local wds
        local adhoc sta apmode mon
        local adhoc_if sta_if ap_if mon_if
+       local _c=0
 
        config_get vifs "$device" vifs
        for vif in $vifs; do
                config_get mode "$vif" mode
+               _c=$(($_c + 1))
                case "$mode" in
                        adhoc)
                                adhoc=1
@@ -53,7 +55,11 @@ scan_broadcom() {
 
        ap=1
        infra=1
-       mssid=1
+       if [ "$_c" -gt 1 ]; then
+               mssid=1
+       else
+               mssid=
+       fi
        apsta=0
        radio=1
        monitor=0