Fix macfiltering for broadcom devices (#2822)
authorFlorian Fainelli <florian@openwrt.org>
Wed, 19 Dec 2007 17:49:51 +0000 (17:49 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Wed, 19 Dec 2007 17:49:51 +0000 (17:49 +0000)
SVN-Revision: 9805

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

index 0bffb42908b460e3d5650e3dbfc205eee24b76c2..f52e9b0d752add330d17ca8dbd9140d0d31204d1 100644 (file)
@@ -5,7 +5,6 @@ scan_broadcom() {
        local wds
        local adhoc sta apmode
        local adhoc_if sta_if ap_if
-       local macfilter
 
        config_get vifs "$device" vifs
        for vif in $vifs; do
@@ -69,18 +68,6 @@ scan_broadcom() {
                        radio=0
                ;;
        esac
-       macfilter=0
-       case "$macfilter" in
-               allow|2)
-                       macfilter=2;
-               ;;
-               deny|1)
-                       macfilter=1;
-               ;;
-               disable|0)
-                       macfilter=0;
-               ;;
-       esac
 }
 
 disable_broadcom() {
@@ -127,6 +114,18 @@ enable_broadcom() {
        } || {
                slottime="${slottime:--1}"
        }
+       
+       case "$macfilter" in
+               allow|2)
+                       macfilter=2;
+               ;;
+               deny|1)
+                       macfilter=1;
+               ;;
+               disable|none|0)
+                       macfilter=0;
+               ;;
+       esac
 
        for vif in $vifs; do
                config_get mode "$vif" mode