diff options
author | Andy Boyett <agb@openwrt.org> | 2009-01-31 16:08:57 +0000 |
---|---|---|
committer | Andy Boyett <agb@openwrt.org> | 2009-01-31 16:08:57 +0000 |
commit | f19d25ebb31f101e7dd7ce5068e4b1062b21d61b (patch) | |
tree | fa6e5456a9d63b239026e6591f300d3014645b8c /package/madwifi | |
parent | 32dce30e261bd6b9487efbc2e38bf0b82fc77828 (diff) | |
download | mtk-20170518-f19d25ebb31f101e7dd7ce5068e4b1062b21d61b.zip mtk-20170518-f19d25ebb31f101e7dd7ce5068e4b1062b21d61b.tar.gz mtk-20170518-f19d25ebb31f101e7dd7ce5068e4b1062b21d61b.tar.bz2 |
madwifi: mode txpower to wifi-device section, but remain backwards compatible
SVN-Revision: 14307
Diffstat (limited to 'package/madwifi')
-rw-r--r-- | package/madwifi/Makefile | 8 | ||||
-rwxr-xr-x | package/madwifi/files/lib/wifi/madwifi.sh | 13 |
2 files changed, 14 insertions, 7 deletions
diff --git a/package/madwifi/Makefile b/package/madwifi/Makefile index e6d13a9..943a13c 100644 --- a/package/madwifi/Makefile +++ b/package/madwifi/Makefile @@ -1,5 +1,5 @@ -# -# Copyright (C) 2006-2008 OpenWrt.org +# +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -13,7 +13,7 @@ PKG_NAME:=madwifi ifneq ($(CONFIG_MADWIFI_UPSTREAM),) PKG_VERSION:=0.9.4 - PKG_RELEASE:=1 + PKG_RELEASE:=2 PKG_SOURCE:=madwifi-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.sourceforge.net/madwifi/ @@ -26,7 +26,7 @@ else # PKG_BRANCH:=madwifi-dfs PKG_REV:=3314 PKG_VERSION:=r$(PKG_REV) - PKG_RELEASE:=1 + PKG_RELEASE:=2 PKG_SOURCE_PROTO:=svn PKG_SOURCE_VERSION:=$(PKG_REV) diff --git a/package/madwifi/files/lib/wifi/madwifi.sh b/package/madwifi/files/lib/wifi/madwifi.sh index 550bba7..52086f0 100755 --- a/package/madwifi/files/lib/wifi/madwifi.sh +++ b/package/madwifi/files/lib/wifi/madwifi.sh @@ -78,12 +78,13 @@ enable_atheros() { fi config_get channel "$device" channel config_get vifs "$device" vifs + config_get txpower "$device" txpower [ auto = "$channel" ] && channel=0 local first=1 for vif in $vifs; do - local start_hostapd + local start_hostapd vif_txpower nosbeacon= config_get ifname "$vif" ifname config_get enc "$vif" encryption @@ -299,8 +300,14 @@ enable_atheros() { set_wifi_up "$vif" "$ifname" # TXPower settings only work if device is up already - config_get txpwr "$vif" txpower - [ -n "$txpwr" ] && iwconfig "$ifname" txpower "${txpwr%%.*}" + # while atheros hardware theoretically is capable of per-vif (even per-packet) txpower + # adjustment it does not work with the current atheros hal/madwifi driver + + config_get vif_txpower "$vif" txpower + # use vif_txpower (from wifi-iface) instead of txpower (from wifi-device) if + # the latter doesn't exist + txpower="${txpower:-$vif_txpower}" + [ -z "$txpower" ] || iwconfig "$ifname" txpower "${txpower%%.*}" case "$mode" in ap) |