From 15b49759252e319ddc794c64ab3c5b8318314d63 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 25 Nov 2013 15:43:30 +0000 Subject: hostapd: add support for auto-channel selection Signed-off-by: Felix Fietkau SVN-Revision: 38915 --- package/kernel/mac80211/files/lib/wifi/mac80211.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'package/kernel') 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} -- cgit v1.1