merge r14306, r14307, r14309, and r14311 to 8.09: [package] broadcom,madwifi,mac80211...
authorAndy Boyett <agb@openwrt.org>
Sat, 31 Jan 2009 16:17:30 +0000 (16:17 +0000)
committerAndy Boyett <agb@openwrt.org>
Sat, 31 Jan 2009 16:17:30 +0000 (16:17 +0000)
SVN-Revision: 14312

docs/wireless.tex
package/broadcom-wl/Makefile
package/broadcom-wl/files/lib/wifi/broadcom.sh
package/mac80211/Makefile
package/mac80211/files/lib/wifi/mac80211.sh
package/madwifi/Makefile
package/madwifi/files/lib/wifi/madwifi.sh

index bc41b0e054f21e0e28bab93dd3a89034b3e7fc82..dd6ec43dd9ead3d4a98644aeb623c595cd510752 100644 (file)
@@ -102,12 +102,13 @@ config wifi-device    wifi device name
     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
@@ -152,6 +153,9 @@ config wifi-iface
     \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}:}
@@ -192,7 +196,7 @@ config 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:
index 345f84999486cc3afe11dc6bc3e0e06057b46e46..e49fc50a880b3eb7d31e72827178c182f6f5b150 100644 (file)
@@ -1,5 +1,5 @@
-# 
-# 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.
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 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
index 46d93a8fbd0ef93d101a5a8135c43b752ecac0c8..912e6d750aa550a8662c9abdddbd95dc34d99e55 100644 (file)
@@ -122,7 +122,8 @@ enable_broadcom() {
        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)"
@@ -151,7 +152,7 @@ enable_broadcom() {
        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"
@@ -303,7 +304,11 @@ EOF
        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"
 }
index a3b483cb52bd53e7ec2ceebbbf6b43c9272fa4ee..d2369b0ec1ea101e6a99dc2ebf065a7666353467 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 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
index 74105c666228d734cffd308b7973dfae6b62f637..0a3577be85de0d26b259d79e54dae399d3d7972a 100644 (file)
@@ -50,7 +50,12 @@ enable_mac80211() {
        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
@@ -112,10 +117,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
index e6d13a936b574a323aa289888fe1f1f09ab7a8a5..943a13c215263ce6a217982c56af10ea458c40f0 100644 (file)
@@ -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)
index 90a27cf7bcf1229acedf887b6920f883e0924bb4..eae82a7f04764ee7bb7fd242d47feb33f195673e 100755 (executable)
@@ -69,12 +69,13 @@ enable_atheros() {
        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
@@ -290,6 +291,17 @@ enable_atheros() {
                [ -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