aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-04-28 18:21:34 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2013-04-28 18:21:34 +0000
commit3be90613fda89b83409302b0888f0941d7d43418 (patch)
treeb7d14782832cd2e5d0004feeff0df943927835d6
parent00a7ace7cfbb2699c9152b04491079497eb20d9d (diff)
downloadupstream-3be90613fda89b83409302b0888f0941d7d43418.tar.gz
upstream-3be90613fda89b83409302b0888f0941d7d43418.tar.bz2
upstream-3be90613fda89b83409302b0888f0941d7d43418.zip
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 <zajec5@gmail.com> SVN-Revision: 36479
-rw-r--r--package/broadcom-wl/files/lib/wifi/broadcom.sh5
1 files changed, 4 insertions, 1 deletions
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 <<EOF
config wifi-device wl${i}
option type broadcom
- option channel 11
+ option channel ${channel:-11}
# REMOVE THIS LINE TO ENABLE WIFI:
option disabled 1