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 | 9b4b4d39144660335dddd7a11b45896fe369e60e (patch) | |
tree | d35cf0ec92be2a98fdd3a30a22bf3b489bc733f8 /package/mac80211 | |
parent | 776b1b6c8379c89fbbc35ab14617758ebef938f4 (diff) | |
download | upstream-9b4b4d39144660335dddd7a11b45896fe369e60e.tar.gz upstream-9b4b4d39144660335dddd7a11b45896fe369e60e.tar.bz2 upstream-9b4b4d39144660335dddd7a11b45896fe369e60e.zip |
[package] mac80211: move txpower to wifi-device section, but remain backwards compatible
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14309 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211')
-rw-r--r-- | package/mac80211/Makefile | 2 | ||||
-rw-r--r-- | package/mac80211/files/lib/wifi/mac80211.sh | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/package/mac80211/Makefile b/package/mac80211/Makefile index 4f14e93b65..0448f0063a 100644 --- a/package/mac80211/Makefile +++ b/package/mac80211/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 -PKG_RELEASE:=1 +PKG_RELEASE:=2 ifneq ($(CONFIG_LINUX_2_6_27)$(CONFIG_LINUX_2_6_28),) PKG_VERSION:=2009-01-29 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 |