[package] mac80211: use first available channel from current phy if channel is set to "auto"
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27976 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
56093f4fdb
commit
e0712a54a6
|
@ -17,7 +17,13 @@ mac80211_hostapd_setup_base() {
|
||||||
config_get basic_rate_list "$device" basic_rate
|
config_get basic_rate_list "$device" basic_rate
|
||||||
config_get_bool noscan "$device" noscan
|
config_get_bool noscan "$device" noscan
|
||||||
[ -n "$channel" -a -z "$hwmode" ] && wifi_fixup_hwmode "$device"
|
[ -n "$channel" -a -z "$hwmode" ] && wifi_fixup_hwmode "$device"
|
||||||
[ "$channel" = auto ] && channel=
|
|
||||||
|
[ "$channel" = auto ] && {
|
||||||
|
channel=$(iw phy "$phy" info | \
|
||||||
|
sed -ne '/MHz/ { /disabled\|passive\|radar/d; s/.*\[//; s/\].*//; p; q }')
|
||||||
|
config_set "$device" channel "$channel"
|
||||||
|
}
|
||||||
|
|
||||||
[ -n "$hwmode" ] && {
|
[ -n "$hwmode" ] && {
|
||||||
config_get hwmode_11n "$device" hwmode_11n
|
config_get hwmode_11n "$device" hwmode_11n
|
||||||
[ -n "$hwmode_11n" ] && {
|
[ -n "$hwmode_11n" ] && {
|
||||||
|
|
Loading…
Reference in New Issue