From: Hauke Mehrtens Date: Sun, 28 Apr 2013 18:21:34 +0000 (+0000) Subject: broadcom-wl: read channel using wlc on detect X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=e4cc170c7794ad242e76d19754cf12c1f35b5bfe broadcom-wl: read channel using wlc on detect 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 SVN-Revision: 36479 --- diff --git a/package/broadcom-wl/files/lib/wifi/broadcom.sh b/package/broadcom-wl/files/lib/wifi/broadcom.sh index 57e11e4b14..72b85aaf88 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 <