aboutsummaryrefslogtreecommitdiffstats
path: root/package/madwifi/files
diff options
context:
space:
mode:
Diffstat (limited to 'package/madwifi/files')
-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" ] || {