mac80211: apply txpower after bringing up the interface, should fix #10113

SVN-Revision: 29566
This commit is contained in:
Felix Fietkau 2011-12-18 22:19:21 +00:00
parent 25540787ad
commit fe8a3a36f0

View file

@ -394,12 +394,6 @@ enable_mac80211() {
[ -n "$fixed" -a -n "$channel" ] && iw dev "$ifname" set channel "$channel" [ -n "$fixed" -a -n "$channel" ] && iw dev "$ifname" set channel "$channel"
fi 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" ] || iw dev "$ifname" set txpower fixed "${txpower%%.*}00"
i=$(($i + 1)) i=$(($i + 1))
done done
@ -434,6 +428,12 @@ enable_mac80211() {
[ ! "$mode" = "ap" ] || continue [ ! "$mode" = "ap" ] || continue
ifconfig "$ifname" up ifconfig "$ifname" up
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" ] || iw dev "$ifname" set txpower fixed "${txpower%%.*}00"
if [ ! "$mode" = "ap" ]; then if [ ! "$mode" = "ap" ]; then
ifconfig "$ifname" up ifconfig "$ifname" up
case "$mode" in case "$mode" in