From: thepeople Date: Wed, 3 Dec 2008 21:34:04 +0000 (+0000) Subject: Move txpower settings after the interface comes up. Thanks alisonken1 X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=commitdiff_plain;h=5cfdd78360b20a232b58db86b184528f63f9649f 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 --- diff --git a/package/madwifi/files/lib/wifi/madwifi.sh b/package/madwifi/files/lib/wifi/madwifi.sh index 0ff929260..638640a96 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" ] || {