diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2013-04-28 18:21:34 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2013-04-28 18:21:34 +0000 |
commit | 54eb5992b3b32bae31ece1fc324f9e171db4f545 (patch) | |
tree | f966c714177f7f616e5bab5b6d2366e0fe3321d7 /package | |
parent | 219ed3f7c16da490c76976c375391929b7204fa9 (diff) | |
download | master-187ad058-54eb5992b3b32bae31ece1fc324f9e171db4f545.tar.gz master-187ad058-54eb5992b3b32bae31ece1fc324f9e171db4f545.tar.bz2 master-187ad058-54eb5992b3b32bae31ece1fc324f9e171db4f545.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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36479 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/broadcom-wl/files/lib/wifi/broadcom.sh | 5 |
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 |