diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-04-16 20:59:16 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-04-16 20:59:16 +0000 |
commit | 441413596f2067ace60f8264cd4c20afd1beb8fa (patch) | |
tree | f55a34feb0f6e78def73e6f02841fd8caed2ce58 /package/madwifi/files/lib/wifi/madwifi.sh | |
parent | 202d6e13795c9e4deac6a47fa39289deff0ae291 (diff) | |
download | upstream-441413596f2067ace60f8264cd4c20afd1beb8fa.tar.gz upstream-441413596f2067ace60f8264cd4c20afd1beb8fa.tar.bz2 upstream-441413596f2067ace60f8264cd4c20afd1beb8fa.zip |
improve handling of 11a/b/g mode setting. redirect iwconfig channel errors to /dev/null (the command fails at times and needs to be run multiple times, because it's a bit unreliable)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6975 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/madwifi/files/lib/wifi/madwifi.sh')
-rwxr-xr-x | package/madwifi/files/lib/wifi/madwifi.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/package/madwifi/files/lib/wifi/madwifi.sh b/package/madwifi/files/lib/wifi/madwifi.sh index 1dce76715b..15e7850eb9 100755 --- a/package/madwifi/files/lib/wifi/madwifi.sh +++ b/package/madwifi/files/lib/wifi/madwifi.sh @@ -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")" |