diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2014-10-05 10:26:10 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2014-10-27 13:48:23 +0100 |
commit | 9853abe33a8089ba780d6281620da7bf5144fdcf (patch) | |
tree | f730280934e9c2f72477469735e0237bc078436f /iwinfo_wl.c | |
parent | fe7133f7e5a4faca63b6d939c6d55d09d8c240fb (diff) | |
download | iwinfo-9853abe33a8089ba780d6281620da7bf5144fdcf.tar.gz |
iwinfo: detect HT PHY for broadcom-wl
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn+ssh://svn.openwrt.org/openwrt/trunk@42760 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'iwinfo_wl.c')
-rw-r--r-- | iwinfo_wl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/iwinfo_wl.c b/iwinfo_wl.c index b626b28..57e4acf 100644 --- a/iwinfo_wl.c +++ b/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; |