aboutsummaryrefslogtreecommitdiffstats
path: root/package/madwifi
diff options
context:
space:
mode:
authorTravis Kemen <thepeople@openwrt.org>2008-12-03 21:34:04 +0000
committerTravis Kemen <thepeople@openwrt.org>2008-12-03 21:34:04 +0000
commit27778ec7cde5b9fe1e26097a80dd095548f0c74e (patch)
tree11a4754d8db93a7b4cd6ed4eb52fd4e2f0546fa5 /package/madwifi
parentbe08911e941efba2260785272d68518a38d052c3 (diff)
downloadupstream-27778ec7cde5b9fe1e26097a80dd095548f0c74e.tar.gz
upstream-27778ec7cde5b9fe1e26097a80dd095548f0c74e.tar.bz2
upstream-27778ec7cde5b9fe1e26097a80dd095548f0c74e.zip
Move txpower settings after the interface comes up. Thanks alisonken1
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13502 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/madwifi')
-rwxr-xr-xpackage/madwifi/files/lib/wifi/madwifi.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/package/madwifi/files/lib/wifi/madwifi.sh b/package/madwifi/files/lib/wifi/madwifi.sh
index 0ff9292600..638640a962 100755
--- a/package/madwifi/files/lib/wifi/madwifi.sh
+++ b/package/madwifi/files/lib/wifi/madwifi.sh
@@ -211,9 +211,6 @@ enable_atheros() {
config_get distance "$device" distance
[ -n "$distance" ] && athctrl -i "$device" -d "$distance" >&-
- config_get txpwr "$vif" txpower
- [ -n "$txpwr" ] && iwconfig "$ifname" txpower "${txpwr%%.*}"
-
config_get rate "$vif" rate
[ -n "$rate" ] && iwconfig "$ifname" rate "${rate%%.*}"
@@ -277,6 +274,11 @@ enable_atheros() {
esac
ifconfig "$ifname" up
+
+ # TXPower settings only work if device is up already
+ config_get txpwr "$vif" txpower
+ [ -n "$txpwr" ] && iwconfig "$ifname" txpower "${txpwr%%.*}"
+
local net_cfg bridge
net_cfg="$(find_net_config "$vif")"
[ -z "$net_cfg" ] || {