aboutsummaryrefslogtreecommitdiffstats
path: root/package
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
commit1c6d1e08b7263235640a3eba64af5abbfed9c3e3 (patch)
tree14216b3470e3554a0661752c78afe8b5ce8a7a61 /package
parent85b0fa9262f60fab70e3bff91acd8927f2ed081c (diff)
downloadmaster-187ad058-1c6d1e08b7263235640a3eba64af5abbfed9c3e3.tar.gz
master-187ad058-1c6d1e08b7263235640a3eba64af5abbfed9c3e3.tar.bz2
master-187ad058-1c6d1e08b7263235640a3eba64af5abbfed9c3e3.zip
fix madwifi mode setting
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11882 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-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" ] || {