summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshok Raj Nagarajan <arnagara@qti.qualcomm.com>2015-09-22 19:26:00 +0530
committerJouni Malinen <j@w1.fi>2015-09-23 12:09:35 +0300
commit28ffd21c0749413925c0f31d87a41d70a215d255 (patch)
tree8e68931eedc3b94e0939c251e2e7b5e41f1eecb3
parentf455998afe9e72e2f4a3c78a64cbab557f4ffeea (diff)
downloadhostap-28ffd21c0749413925c0f31d87a41d70a215d255.tar.gz
Do not copy STA VHT capabilities if VHT is not enabled for AP
Previously, station's VHT information elements were copied and passed regardless of the AP's VHT configuration. As a result, AP with VHT disabled in configuration could have ended up transmitting packets in VHT rates though AP is not advertising VHT support. Fix this by copying the station's VHT capabilities only when AP supports VHT (both hardware and configuration). Signed-off-by: Ashok Raj Nagarajan <arnagara@qti.qualcomm.com>
-rw-r--r--src/ap/ieee802_11.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 19c6a12e0..7bb18c01d 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -1373,13 +1373,15 @@ static u16 check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta,
#endif /* CONFIG_IEEE80211N */
#ifdef CONFIG_IEEE80211AC
- resp = copy_sta_vht_capab(hapd, sta, elems.vht_capabilities);
- if (resp != WLAN_STATUS_SUCCESS)
- return resp;
+ if (hapd->iconf->ieee80211ac) {
+ resp = copy_sta_vht_capab(hapd, sta, elems.vht_capabilities);
+ if (resp != WLAN_STATUS_SUCCESS)
+ return resp;
- resp = set_sta_vht_opmode(hapd, sta, elems.vht_opmode_notif);
- if (resp != WLAN_STATUS_SUCCESS)
- return resp;
+ resp = set_sta_vht_opmode(hapd, sta, elems.vht_opmode_notif);
+ if (resp != WLAN_STATUS_SUCCESS)
+ return resp;
+ }
if (hapd->iconf->ieee80211ac && hapd->iconf->require_vht &&
!(sta->flags & WLAN_STA_VHT)) {