aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-11-25 15:43:30 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-11-25 15:43:30 +0000
commit4d6e9371a3e0a99065e841283147097047b90af7 (patch)
treee576d40d300efdfb75bf8430dcfb6500d2e844fa /package/kernel/mac80211/files
parent5d000ddd9e970237c8ae823e83ee9e5c63ebeadb (diff)
downloadmaster-187ad058-4d6e9371a3e0a99065e841283147097047b90af7.tar.gz
master-187ad058-4d6e9371a3e0a99065e841283147097047b90af7.tar.bz2
master-187ad058-4d6e9371a3e0a99065e841283147097047b90af7.zip
hostapd: add support for auto-channel selection
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38915 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/files')
-rw-r--r--package/kernel/mac80211/files/lib/wifi/mac80211.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
index 13afa813b0..1994ca38d4 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}