mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 01:37:10 +02:00
mac80211: clean up init, remove some redundant checks, fix tx power init (#10113)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29606 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
71a38e2476
commit
5c56c7216a
@ -425,8 +425,7 @@ enable_mac80211() {
|
||||
for vif in $vifs; do
|
||||
config_get mode "$vif" mode
|
||||
config_get ifname "$vif" ifname
|
||||
[ ! "$mode" = "ap" ] || continue
|
||||
ifconfig "$ifname" up
|
||||
[ "$mode" = "ap" ] || ifconfig "$ifname" up
|
||||
|
||||
config_get vif_txpower "$vif" txpower
|
||||
# use vif_txpower (from wifi-iface) to override txpower (from
|
||||
@ -434,8 +433,6 @@ enable_mac80211() {
|
||||
txpower="${txpower:-$vif_txpower}"
|
||||
[ -z "$txpower" ] || iw dev "$ifname" set txpower fixed "${txpower%%.*}00"
|
||||
|
||||
if [ ! "$mode" = "ap" ]; then
|
||||
ifconfig "$ifname" up
|
||||
case "$mode" in
|
||||
adhoc)
|
||||
config_get bssid "$vif" bssid
|
||||
@ -508,8 +505,7 @@ enable_mac80211() {
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
mac80211_start_vif "$vif" "$ifname"
|
||||
fi
|
||||
[ "$mode" = "ap" ] || mac80211_start_vif "$vif" "$ifname"
|
||||
done
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user