From c8f24b9ffdfb1b0979735668d1323cfa6856dca9 Mon Sep 17 00:00:00 2001 From: hauke Date: Sun, 28 Apr 2013 18:21:34 +0000 Subject: broadcom-wl: read channel using wlc on detect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hardcoding channel number to 11 is a bad idea, it may be even not available on some devices. If there are two single-band radios, the one for 5GHz doesn't have 11 channel. Signed-off-by: Rafał Miłecki git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36479 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/broadcom-wl/files/lib/wifi/broadcom.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'package') diff --git a/package/broadcom-wl/files/lib/wifi/broadcom.sh b/package/broadcom-wl/files/lib/wifi/broadcom.sh index 57e11e4b1..72b85aaf8 100644 --- a/package/broadcom-wl/files/lib/wifi/broadcom.sh +++ b/package/broadcom-wl/files/lib/wifi/broadcom.sh @@ -370,12 +370,15 @@ detect_broadcom() { local i=-1 while grep -qs "^ *wl$((++i)):" /proc/net/dev; do + local channel + config_get type wl${i} type [ "$type" = broadcom ] && continue + channel=`wlc ifname wl${i} channel` cat <