diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-10-05 10:26:10 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-10-05 10:26:10 +0000 |
commit | dac05f6724c680097ec99f9a781684c34d79fb08 (patch) | |
tree | 5dcdec5e7938adf4305ee0c2756d144a25cb332f /package/network/utils/iwinfo | |
parent | 349b20c197f56eb68a14d76df226c9ccfda9e98e (diff) | |
download | upstream-dac05f6724c680097ec99f9a781684c34d79fb08.tar.gz upstream-dac05f6724c680097ec99f9a781684c34d79fb08.tar.bz2 upstream-dac05f6724c680097ec99f9a781684c34d79fb08.zip |
iwinfo: detect HT PHY for broadcom-wl
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 42760
Diffstat (limited to 'package/network/utils/iwinfo')
-rw-r--r-- | package/network/utils/iwinfo/src/api/broadcom.h | 1 | ||||
-rw-r--r-- | package/network/utils/iwinfo/src/iwinfo_wl.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/package/network/utils/iwinfo/src/api/broadcom.h b/package/network/utils/iwinfo/src/api/broadcom.h index c7aa33e415..672083cc79 100644 --- a/package/network/utils/iwinfo/src/api/broadcom.h +++ b/package/network/utils/iwinfo/src/api/broadcom.h @@ -55,6 +55,7 @@ #define WLC_PHY_TYPE_G 2 #define WLC_PHY_TYPE_N 4 #define WLC_PHY_TYPE_LP 5 +#define WLC_PHY_TYPE_HT 7 #define WLC_BAND_5G 1 #define WLC_BAND_2G 2 diff --git a/package/network/utils/iwinfo/src/iwinfo_wl.c b/package/network/utils/iwinfo/src/iwinfo_wl.c index b626b285bb..57e4acf002 100644 --- a/package/network/utils/iwinfo/src/iwinfo_wl.c +++ b/package/network/utils/iwinfo/src/iwinfo_wl.c @@ -592,6 +592,7 @@ static int wl_get_hwmodelist(const char *ifname, int *buf) if (!wl_ioctl(ifname, WLC_GET_PHYTYPE, &phytype, sizeof(phytype)) && !wl_ioctl(ifname, WLC_GET_BANDLIST, band, sizeof(band))) { + *buf = 0; switch (phytype) { case WLC_PHY_TYPE_A: @@ -600,15 +601,16 @@ static int wl_get_hwmodelist(const char *ifname, int *buf) case WLC_PHY_TYPE_B: *buf = IWINFO_80211_B; break; + case WLC_PHY_TYPE_HT: + case WLC_PHY_TYPE_N: + *buf |= IWINFO_80211_N; case WLC_PHY_TYPE_LP: case WLC_PHY_TYPE_G: - case WLC_PHY_TYPE_N: bands = 0; for (i = 1; i <= band[0]; i++) { bands |= band[i]; } - *buf = 0; if (bands & WLC_BAND_5G) *buf |= IWINFO_80211_A; if (bands & WLC_BAND_2G) @@ -616,8 +618,6 @@ static int wl_get_hwmodelist(const char *ifname, int *buf) *buf |= IWINFO_80211_B; *buf |= IWINFO_80211_G; } - if (phytype == WLC_PHY_TYPE_N) - *buf |= IWINFO_80211_N; break; default: return -1; |