diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2013-11-11 21:58:19 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2013-11-11 21:58:19 +0000 |
commit | f69841c940a4272f75bc060d103c6c9ee121a48a (patch) | |
tree | 3b7214d001a12496c28b4135d2b253d7d9e2a5a6 | |
parent | 8f00f8f0484fad506055670480b78bef9e43b05a (diff) | |
download | master-187ad058-f69841c940a4272f75bc060d103c6c9ee121a48a.tar.gz master-187ad058-f69841c940a4272f75bc060d103c6c9ee121a48a.tar.bz2 master-187ad058-f69841c940a4272f75bc060d103c6c9ee121a48a.zip |
broadcom-wl: fix band reporting
Modify the band reporting for broadcom devices to correctly report
HW capability. Currently, 802.11na devices report "bgn"; but should be
reporting "an".
Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38749 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/kernel/broadcom-wl/patches/014-fix-band-reporting.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/package/kernel/broadcom-wl/patches/014-fix-band-reporting.patch b/package/kernel/broadcom-wl/patches/014-fix-band-reporting.patch new file mode 100644 index 0000000000..f1305a45d2 --- /dev/null +++ b/package/kernel/broadcom-wl/patches/014-fix-band-reporting.patch @@ -0,0 +1,41 @@ +--- a/driver/wl_iw.c ++++ b/driver/wl_iw.c +@@ -314,7 +314,7 @@ + ) + { + int phytype, err; +- uint band[3]; ++ uint i, band[3], bands; + char cap[5]; + + WL_TRACE(("%s: SIOCGIWNAME\n", dev->name)); +@@ -335,16 +335,20 @@ + break; + case WLC_PHY_TYPE_LP: + case WLC_PHY_TYPE_G: +- if (band[0] >= 2) +- strcpy(cap, "abg"); +- else +- strcpy(cap, "bg"); +- break; + case WLC_PHY_TYPE_N: +- if (band[0] >= 2) +- strcpy(cap, "abgn"); +- else +- strcpy(cap, "bgn"); ++ bands = 0; ++ for (i = 1; i <= band[0]; i++) { ++ bands |= dtoh32(band[i]); ++ } ++ strcpy(cap, ""); ++ if (bands & WLC_BAND_5G) ++ strcat(cap, "a"); ++ if (bands & WLC_BAND_2G) ++ strcat(cap, "bg"); ++ if (phytype == WLC_PHY_TYPE_N) ++ strcat(cap, "n"); ++ break; ++ default: + break; + } + done: |