aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-04-16 20:59:16 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-04-16 20:59:16 +0000
commit53a2bf0f5927d763e06e9a435261988371b610ee (patch)
tree6b6e54a11ed23d3d8a01fc62fcd454a4755fafd9 /package
parent137352bdc6081f3b17ddd1c3cf4a310969d9272d (diff)
downloadupstream-53a2bf0f5927d763e06e9a435261988371b610ee.tar.gz
upstream-53a2bf0f5927d763e06e9a435261988371b610ee.tar.bz2
upstream-53a2bf0f5927d763e06e9a435261988371b610ee.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)
SVN-Revision: 6975
Diffstat (limited to 'package')
-rwxr-xr-xpackage/madwifi/files/lib/wifi/madwifi.sh9
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")"