mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-25 10:57:23 +02:00
madwifi.sh channel fix
In the madwifi.sh there is to read "only need to change freq band and channel on the first vif". This is wrong. For example if you create a new Ad-Hoc network and an AP interface, the channel is reseted to 1, regardless of the UCI setting. So remove this wrong code. Signed-off-by: Alina Friedrichsen <x-alina@gmx.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16814 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
e86d60479c
commit
90951f130b
@ -126,7 +126,6 @@ enable_atheros() {
|
|||||||
config_get distance "$device" distance
|
config_get distance "$device" distance
|
||||||
[ -n "$distance" ] && sysctl -w dev."$device".distance="$distance" >&-
|
[ -n "$distance" ] && sysctl -w dev."$device".distance="$distance" >&-
|
||||||
|
|
||||||
local first=1
|
|
||||||
for vif in $vifs; do
|
for vif in $vifs; do
|
||||||
local start_hostapd= vif_txpower= nosbeacon=
|
local start_hostapd= vif_txpower= nosbeacon=
|
||||||
config_get ifname "$vif" ifname
|
config_get ifname "$vif" ifname
|
||||||
@ -146,28 +145,25 @@ enable_atheros() {
|
|||||||
}
|
}
|
||||||
config_set "$vif" ifname "$ifname"
|
config_set "$vif" ifname "$ifname"
|
||||||
|
|
||||||
# only need to change freq band and channel on the first vif
|
|
||||||
[ "$first" = 1 ] && {
|
|
||||||
config_get hwmode "$device" hwmode
|
config_get hwmode "$device" hwmode
|
||||||
[ -z "$hwmode" ] && config_get hwmode "$device" mode
|
[ -z "$hwmode" ] && config_get hwmode "$device" mode
|
||||||
|
|
||||||
pureg=0
|
pureg=0
|
||||||
case "$hwmode" in
|
case "$hwmode" in
|
||||||
*b) hwmode=11b;;
|
*b) hwmode=11b;;
|
||||||
*bg) hwmode=11g;;
|
*bg) hwmode=11g;;
|
||||||
*g) hwmode=11g; pureg=1;;
|
*g) hwmode=11g; pureg=1;;
|
||||||
*gdt) hwmode=11gdt;;
|
*gdt) hwmode=11gdt;;
|
||||||
*a) hwmode=11a;;
|
*a) hwmode=11a;;
|
||||||
*adt) hwmode=11adt;;
|
*adt) hwmode=11adt;;
|
||||||
*ast) hwmode=11ast;;
|
*ast) hwmode=11ast;;
|
||||||
*fh) hwmode=fh;;
|
*fh) hwmode=fh;;
|
||||||
*) hwmode=auto;;
|
*) hwmode=auto;;
|
||||||
esac
|
esac
|
||||||
iwpriv "$ifname" mode "$hwmode"
|
iwpriv "$ifname" mode "$hwmode"
|
||||||
iwpriv "$ifname" pureg "$pureg"
|
iwpriv "$ifname" pureg "$pureg"
|
||||||
|
|
||||||
iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null
|
iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null
|
||||||
}
|
|
||||||
|
|
||||||
config_get_bool hidden "$vif" hidden 0
|
config_get_bool hidden "$vif" hidden 0
|
||||||
iwpriv "$ifname" hide_ssid "$hidden"
|
iwpriv "$ifname" hide_ssid "$hidden"
|
||||||
@ -339,7 +335,6 @@ enable_atheros() {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
first=0
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user