diff options
author | Andy Boyett <agb@openwrt.org> | 2009-01-31 16:09:39 +0000 |
---|---|---|
committer | Andy Boyett <agb@openwrt.org> | 2009-01-31 16:09:39 +0000 |
commit | 0da13fa8bab3ff76cbba50ab6c8980e3fa2add22 (patch) | |
tree | f97bbcb0f3cae97fb91a6fb03fa55b14062cb7d5 /package/mac80211/files | |
parent | 6360bd2798a9e88449a4551e35fce801189e9940 (diff) | |
download | upstream-0da13fa8bab3ff76cbba50ab6c8980e3fa2add22.tar.gz upstream-0da13fa8bab3ff76cbba50ab6c8980e3fa2add22.tar.bz2 upstream-0da13fa8bab3ff76cbba50ab6c8980e3fa2add22.zip |
mac80211: move txpower to wifi-device section, but remain backwards compatible
SVN-Revision: 14309
Diffstat (limited to 'package/mac80211/files')
-rw-r--r-- | package/mac80211/files/lib/wifi/mac80211.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh index 6144ce40ae..8f3ed4a25a 100644 --- a/package/mac80211/files/lib/wifi/mac80211.sh +++ b/package/mac80211/files/lib/wifi/mac80211.sh @@ -50,6 +50,7 @@ enable_mac80211() { local device="$1" config_get channel "$device" channel config_get vifs "$device" vifs + config_get txpower "$device" txpower local first=1 for vif in $vifs; do @@ -112,10 +113,11 @@ enable_mac80211() { esac config_get ssid "$vif" ssid - config_get txpwr "$vif" txpower - if [ -n "$txpwr" ]; then - iwconfig "$ifname" txpower "${txpwr%%.*}" - fi + config_get vif_txpower "$vif" txpower + # use vif_txpower (from wifi-iface) to override txpower (from + # wifi-device) if the latter doesn't exist + txpower="${txpower:-$vif_txpower}" + [ -z "$txpower" ] || iwconfig "$ifname" txpower "${txpower%%.*}" config_get frag "$vif" frag if [ -n "$frag" ]; then |