aboutsummaryrefslogtreecommitdiffstats
path: root/package/madwifi/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-07-20 00:51:00 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-07-20 00:51:00 +0000
commit67039dcf9ee1b2deb6b8ab6777279c3862a8dd6e (patch)
tree2399b6eed9bccc91221962b1d501a37b7de52a16 /package/madwifi/files
parent3ad51a1c33242a5d8ae569e85d19ae4450aeb537 (diff)
downloadupstream-67039dcf9ee1b2deb6b8ab6777279c3862a8dd6e.tar.gz
upstream-67039dcf9ee1b2deb6b8ab6777279c3862a8dd6e.tar.bz2
upstream-67039dcf9ee1b2deb6b8ab6777279c3862a8dd6e.zip
fix madwifi mode setting
SVN-Revision: 11882
Diffstat (limited to 'package/madwifi/files')
-rwxr-xr-xpackage/madwifi/files/lib/wifi/madwifi.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/package/madwifi/files/lib/wifi/madwifi.sh b/package/madwifi/files/lib/wifi/madwifi.sh
index 5adeee44be..97ad52bae2 100755
--- a/package/madwifi/files/lib/wifi/madwifi.sh
+++ b/package/madwifi/files/lib/wifi/madwifi.sh
@@ -97,6 +97,8 @@ enable_atheros() {
[ "$first" = 1 ] && {
# only need to change freq band and channel on the first vif
config_get agmode "$device" agmode
+ [ -z "$agmode" ] && config_get agmode "$device" mode
+
pureg=0
case "$agmode" in
*b) agmode=11b;;
@@ -105,11 +107,9 @@ enable_atheros() {
*a) agmode=11a;;
*) agmode=auto;;
esac
- iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null
iwpriv "$ifname" mode "$agmode"
iwpriv "$ifname" pureg "$pureg"
iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null
- ifconfig "$ifname" up
}
config_get_bool hidden "$vif" hidden 0
@@ -244,8 +244,6 @@ enable_atheros() {
esac
ifconfig "$ifname" up
- iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null
-
local net_cfg bridge
net_cfg="$(find_net_config "$vif")"
[ -z "$net_cfg" ] || {