aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Eckelmann <sven.eckelmann@openmesh.com>2017-06-09 09:39:51 (GMT)
committerJouni Malinen <j@w1.fi>2017-07-18 10:39:46 (GMT)
commitb0fc2ef3a37eb753a773c4e205ec5c2f787e5b38 (patch)
treed5c12d32e38cc4a94075113cf15d5d9e0f289a44 /src
parent9a6e2a5edee277f260ce2287c93d497665f556a6 (diff)
downloadhostap-b0fc2ef3a37eb753a773c4e205ec5c2f787e5b38.zip
hostap-b0fc2ef3a37eb753a773c4e205ec5c2f787e5b38.tar.gz
hostap-b0fc2ef3a37eb753a773c4e205ec5c2f787e5b38.tar.bz2
hw_features: Fix check of supported 802.11ac channel width
The two channel width bits in the VHT capability field can be decoded in following values (IEEE Std 802.11ac-2013 8.4.2.160.2 VHT Capabilities Info field): * 0: no 160 or 80+80 MHz support * 1: 160 MHz support * 2: 160 and 80+80 MHz support * 3: (reserved) The check must therefore not be done bitwise but instead it must checked whether the capabilities announced by the driver are at least the ones requested by the user. Fixes: c781eb842852 ("hostapd: Verify VHT capabilities are supported by driver") Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
Diffstat (limited to 'src')
-rw-r--r--src/common/hw_features_common.c3
-rw-r--r--src/common/ieee802_11_defs.h1
2 files changed, 2 insertions, 2 deletions
diff --git a/src/common/hw_features_common.c b/src/common/hw_features_common.c
index 7a96f96..fdd5e73 100644
--- a/src/common/hw_features_common.c
+++ b/src/common/hw_features_common.c
@@ -526,8 +526,7 @@ int ieee80211ac_cap_check(u32 hw, u32 conf)
} while (0)
VHT_CAP_CHECK_MAX(VHT_CAP_MAX_MPDU_LENGTH_MASK);
- VHT_CAP_CHECK(VHT_CAP_SUPP_CHAN_WIDTH_160MHZ);
- VHT_CAP_CHECK(VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ);
+ VHT_CAP_CHECK_MAX(VHT_CAP_SUPP_CHAN_WIDTH_MASK);
VHT_CAP_CHECK(VHT_CAP_RXLDPC);
VHT_CAP_CHECK(VHT_CAP_SHORT_GI_80);
VHT_CAP_CHECK(VHT_CAP_SHORT_GI_160);
diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
index 393d496..be8ebaf 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -1127,6 +1127,7 @@ struct ieee80211_ampe_ie {
#define VHT_CAP_SUPP_CHAN_WIDTH_160MHZ ((u32) BIT(2))
#define VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ ((u32) BIT(3))
#define VHT_CAP_SUPP_CHAN_WIDTH_MASK ((u32) BIT(2) | BIT(3))
+#define VHT_CAP_SUPP_CHAN_WIDTH_MASK_SHIFT 2
#define VHT_CAP_RXLDPC ((u32) BIT(4))
#define VHT_CAP_SHORT_GI_80 ((u32) BIT(5))
#define VHT_CAP_SHORT_GI_160 ((u32) BIT(6))