[package] broadcom,madwifi,mac80211: move txpower from wifi-iface to wifi-device but retain backward compatiblity
SVN-Revision: 14312
option hwmode 11b, 11g, 11a, 11bg (atheros, mac80211)
option rxantenna 0,1,2 (atheros, broadcom)
option txantenna 0,1,2 (atheros, broadcom)
+ option txpower transmission power in dBm
config wifi-iface
option network the interface you want wifi to bridge with
option device wifi0, wifi1, wifi2, wifiN
option mode ap, sta, adhoc, monitor, or wds
- option txpower transmission power in dBm
+ option txpower (deprecated) transmission power in dBm
option ssid ssid name
option bssid bssid address
option encryption none, wep, psk, psk2, wpa, wpa2
\item \texttt{txantenna} \\
Optional: Antenna identifier (0, 1 or 2) for emission. This feature is supported by atheros and some broadcom chipsets.
+ \item \texttt{txpower}
+ Set the transmission power to be used. The amount is specified in dBm.
+
\end{itemize}
\paragraph{Options for the \texttt{wifi-iface}:}
Set the BSSID address to be used for wds to set the mac address of the other wds unit.
\item \texttt{txpower}
- Set the transmission power to be used. The amount is specified in dBm.
+ (Deprecated, set in wifi-device) Set the transmission power to be used. The amount is specified in dBm.
\item \texttt{encryption} \\
Encryption setting. Accepts the following values:
-#
-# Copyright (C) 2006 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.
PKG_NAME:=broadcom-wl
PKG_VERSION:=4.150.10.5.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
WLC_VERSION:=0.1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
config_get_bool frameburst "$device" frameburst
config_get macfilter "$device" macfilter
config_get maclist "$device" maclist
- local vif_pre_up vif_post_up vif_do_up txpower
+ config_get txpower "$device" txpower
+ local vif_pre_up vif_post_up vif_do_up vif_txpower
_c=0
nas="$(which nas)"
esac
for vif in $vifs; do
- config_get txpower "$vif" txpower
+ config_get vif_txpower "$vif" txpower
config_get mode "$vif" mode
append vif_pre_up "vif $_c" "$N"
wlc stdin <<EOF
$vif_do_up
EOF
- [ -z "$txpower" ] || iwconfig $device txpower ${txpower}dBm
+
+ # use vif_txpower (from last wifi-iface) instead of txpower (from
+ # wifi-device) if the latter does not exist
+ txpower=${txpower:-$vif_txpower}
+ [ -z "$txpower" ] || iwconfig $device txpower ${txpower}dBm
eval "$nas_cmd"
}
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_VERSION:=2008-08-06
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
local device="$1"
config_get channel "$device" channel
config_get vifs "$device" vifs
+<<<<<<< HEAD:package/mac80211/files/lib/wifi/mac80211.sh
+=======
+ config_get txpower "$device" txpower
+
+>>>>>>> ade9976... [package] broadcom,madwifi,mac80211: move txpower from wifi-iface to wifi-device but retain backward compatiblity:package/mac80211/files/lib/wifi/mac80211.sh
local first=1
for vif in $vifs; do
ifconfig "$ifname" down 2>/dev/null
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
-#
-# 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.
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/
# 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)
local device="$1"
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
[ -n "$ssid" ] && iwconfig "$ifname" essid on
iwconfig "$ifname" essid "$ssid"
set_wifi_up "$vif" "$ifname"
+
+ # TXPower settings only work if device is up already
+ # 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)
config_get_bool isolate "$vif" isolate 0