madwifi: keep a/g mode and pureg setting in sync across vaps
SVN-Revision: 12363
This commit is contained in:
parent
2a05d8cbba
commit
4419978f84
1 changed files with 19 additions and 18 deletions
|
@ -94,25 +94,26 @@ enable_atheros() {
|
||||||
}
|
}
|
||||||
config_set "$vif" ifname "$ifname"
|
config_set "$vif" ifname "$ifname"
|
||||||
|
|
||||||
[ "$first" = 1 ] && {
|
# only need to change freq band and channel on the first vif
|
||||||
# only need to change freq band and channel on the first vif
|
config_get agmode "$device" agmode
|
||||||
config_get agmode "$device" agmode
|
[ -z "$agmode" ] && config_get agmode "$device" mode
|
||||||
[ -z "$agmode" ] && config_get agmode "$device" mode
|
|
||||||
|
|
||||||
pureg=0
|
pureg=0
|
||||||
case "$agmode" in
|
case "$agmode" in
|
||||||
*b) agmode=11b;;
|
*b) agmode=11b;;
|
||||||
*bg) agmode=11g;;
|
*bg) agmode=11g;;
|
||||||
*g) agmode=11g; pureg=1;;
|
*g) agmode=11g; pureg=1;;
|
||||||
*gdt) agmode=11gdt;;
|
*gdt) agmode=11gdt;;
|
||||||
*a) agmode=11a;;
|
*a) agmode=11a;;
|
||||||
*adt) agmode=11adt;;
|
*adt) agmode=11adt;;
|
||||||
*ast) agmode=11ast;;
|
*ast) agmode=11ast;;
|
||||||
*fh) agmode=fh;;
|
*fh) agmode=fh;;
|
||||||
*) agmode=auto;;
|
*) agmode=auto;;
|
||||||
esac
|
esac
|
||||||
iwpriv "$ifname" mode "$agmode"
|
iwpriv "$ifname" mode "$agmode"
|
||||||
iwpriv "$ifname" pureg "$pureg"
|
iwpriv "$ifname" pureg "$pureg"
|
||||||
|
|
||||||
|
[ "$first" = 1 ] && {
|
||||||
iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null
|
iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue