aboutsummaryrefslogtreecommitdiffstats
path: root/package/broadcom-wl/files
diff options
context:
space:
mode:
authorAndy Boyett <agb@openwrt.org>2009-01-31 16:08:19 +0000
committerAndy Boyett <agb@openwrt.org>2009-01-31 16:08:19 +0000
commit32dce30e261bd6b9487efbc2e38bf0b82fc77828 (patch)
treee7b72593ed258a3d5c35c93113317ff1e0f400b9 /package/broadcom-wl/files
parent730346e2d595f5a8da9c45605537ede3315e767d (diff)
downloadupstream-32dce30e261bd6b9487efbc2e38bf0b82fc77828.tar.gz
upstream-32dce30e261bd6b9487efbc2e38bf0b82fc77828.tar.bz2
upstream-32dce30e261bd6b9487efbc2e38bf0b82fc77828.zip
broadcom-wl: move txpower back to wifi-device section, but remain backwards compatible
SVN-Revision: 14306
Diffstat (limited to 'package/broadcom-wl/files')
-rw-r--r--package/broadcom-wl/files/lib/wifi/broadcom.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/package/broadcom-wl/files/lib/wifi/broadcom.sh b/package/broadcom-wl/files/lib/wifi/broadcom.sh
index 4c03aff04c..12002121a6 100644
--- a/package/broadcom-wl/files/lib/wifi/broadcom.sh
+++ b/package/broadcom-wl/files/lib/wifi/broadcom.sh
@@ -123,7 +123,8 @@ enable_broadcom() {
config_get macfilter "$device" macfilter
config_get maclist "$device" maclist
config_get macaddr "$device" macaddr
- 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)"
@@ -152,7 +153,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"
@@ -305,7 +306,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"
}