diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-11-25 15:43:30 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-11-25 15:43:30 +0000 |
commit | 15b49759252e319ddc794c64ab3c5b8318314d63 (patch) | |
tree | a1fb1f5662fc3b89fa51e7fef3a12f0a2edff52f | |
parent | 1d75f7506df7518d59b9d3c5297feb93f0828917 (diff) | |
download | mtk-20170518-15b49759252e319ddc794c64ab3c5b8318314d63.zip mtk-20170518-15b49759252e319ddc794c64ab3c5b8318314d63.tar.gz mtk-20170518-15b49759252e319ddc794c64ab3c5b8318314d63.tar.bz2 |
hostapd: add support for auto-channel selection
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 38915
3 files changed, 7 insertions, 6 deletions
diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh index 13afa81..1994ca3 100644 --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh @@ -19,11 +19,8 @@ mac80211_hostapd_setup_base() { [ -n "$channel" -a -z "$hwmode" ] && wifi_fixup_hwmode "$device" - [ "$channel" = auto ] && { - channel=$(iw phy "$phy" info | \ - sed -ne '/MHz/ { /disabled\|passive\|radar/d; s/.*\[//; s/\].*//; p; q }') - config_set "$device" channel "$channel" - } + hostapd_channel=$channel + [ "$channel" = auto -o "$channel" = 0 ] && hostapd_channel=acs_survey [ -n "$hwmode" ] && { config_get hwmode_11n "$device" hwmode_11n @@ -97,7 +94,7 @@ tx_queue_data0_cwmin=3 tx_queue_data0_cwmax=7 tx_queue_data0_burst=1.5 ${hwmode:+hw_mode=$hwmode} -${channel:+channel=$channel} +${hostapd_channel:+channel=$hostapd_channel} ${beacon_int:+beacon_int=$beacon_int} ${country:+country_code=$country} ${noscan:+noscan=$noscan} diff --git a/package/network/services/hostapd/files/hostapd-full.config b/package/network/services/hostapd/files/hostapd-full.config index 2b71781..bc999c0 100644 --- a/package/network/services/hostapd/files/hostapd-full.config +++ b/package/network/services/hostapd/files/hostapd-full.config @@ -164,4 +164,6 @@ CONFIG_NO_DUMP_STATE=y CONFIG_WPS=y CONFIG_FULL_DYNAMIC_VLAN=y +CONFIG_ACS=y + CONFIG_UBUS=y diff --git a/package/network/services/hostapd/files/hostapd-mini.config b/package/network/services/hostapd/files/hostapd-mini.config index 0f0284b..01a04cb 100644 --- a/package/network/services/hostapd/files/hostapd-mini.config +++ b/package/network/services/hostapd/files/hostapd-mini.config @@ -157,4 +157,6 @@ CONFIG_TLS=internal CONFIG_NO_RANDOM_POOL=y CONFIG_NO_DUMP_STATE=y +CONFIG_ACS=y + CONFIG_UBUS=y |