improve handling of 11a/b/g mode setting. redirect iwconfig channel errors to /dev...
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 16 Apr 2007 20:59:16 +0000 (20:59 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 16 Apr 2007 20:59:16 +0000 (20:59 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6975 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/madwifi/files/lib/wifi/madwifi.sh

index 1dce767..15e7850 100755 (executable)
@@ -99,12 +99,13 @@ enable_atheros() {
                                *bg) agmode=11g;;
                                *g) agmode=11g; pureg=1;;
                                *a) agmode=11a;;
-                               *) agmode=11g;;
+                               *) agmode=auto;;
                        esac
-                       iwconfig "$ifname" channel 0 
+                       iwconfig "$ifname" channel 0 >/dev/null 2>/dev/null 
+                       ifconfig "$ifname" up
                        iwpriv "$ifname" mode "$agmode"
                        iwpriv "$ifname" pureg "$pureg"
-                       iwconfig "$ifname" channel "$channel"
+                       iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null 
                }
        
                config_get_bool hidden "$vif" hidden
@@ -181,7 +182,7 @@ enable_atheros() {
                fi
 
                ifconfig "$ifname" up
-               iwconfig "$ifname" channel "$channel"
+               iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null 
 
                local net_cfg bridge
                net_cfg="$(find_net_config "$vif")"
This page took 0.031905 seconds and 4 git commands to generate.