mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-01-27 14:01:05 +02:00
[package] madwifi: mode txpower to wifi-device section, but remain backwards compatible
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14307 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
8451dc8595
commit
7f37b27d4b
@ -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.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -13,7 +13,7 @@ PKG_NAME:=madwifi
|
|||||||
|
|
||||||
ifneq ($(CONFIG_MADWIFI_UPSTREAM),)
|
ifneq ($(CONFIG_MADWIFI_UPSTREAM),)
|
||||||
PKG_VERSION:=0.9.4
|
PKG_VERSION:=0.9.4
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=madwifi-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=madwifi-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://downloads.sourceforge.net/madwifi/
|
PKG_SOURCE_URL:=http://downloads.sourceforge.net/madwifi/
|
||||||
@ -26,7 +26,7 @@ else
|
|||||||
# PKG_BRANCH:=madwifi-dfs
|
# PKG_BRANCH:=madwifi-dfs
|
||||||
PKG_REV:=3314
|
PKG_REV:=3314
|
||||||
PKG_VERSION:=r$(PKG_REV)
|
PKG_VERSION:=r$(PKG_REV)
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=svn
|
PKG_SOURCE_PROTO:=svn
|
||||||
PKG_SOURCE_VERSION:=$(PKG_REV)
|
PKG_SOURCE_VERSION:=$(PKG_REV)
|
||||||
|
@ -78,12 +78,13 @@ enable_atheros() {
|
|||||||
fi
|
fi
|
||||||
config_get channel "$device" channel
|
config_get channel "$device" channel
|
||||||
config_get vifs "$device" vifs
|
config_get vifs "$device" vifs
|
||||||
|
config_get txpower "$device" txpower
|
||||||
|
|
||||||
[ auto = "$channel" ] && channel=0
|
[ auto = "$channel" ] && channel=0
|
||||||
|
|
||||||
local first=1
|
local first=1
|
||||||
for vif in $vifs; do
|
for vif in $vifs; do
|
||||||
local start_hostapd
|
local start_hostapd vif_txpower
|
||||||
nosbeacon=
|
nosbeacon=
|
||||||
config_get ifname "$vif" ifname
|
config_get ifname "$vif" ifname
|
||||||
config_get enc "$vif" encryption
|
config_get enc "$vif" encryption
|
||||||
@ -299,8 +300,14 @@ enable_atheros() {
|
|||||||
set_wifi_up "$vif" "$ifname"
|
set_wifi_up "$vif" "$ifname"
|
||||||
|
|
||||||
# TXPower settings only work if device is up already
|
# TXPower settings only work if device is up already
|
||||||
config_get txpwr "$vif" txpower
|
# while atheros hardware theoretically is capable of per-vif (even per-packet) txpower
|
||||||
[ -n "$txpwr" ] && iwconfig "$ifname" txpower "${txpwr%%.*}"
|
# 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
|
case "$mode" in
|
||||||
ap)
|
ap)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user