diff mbox

AP: Unset HT capabilities for an HT association request without WMM

Message ID 1427182806-29467-1-git-send-email-ilan.peer@intel.com
State Accepted
Headers show

Commit Message

Peer, Ilan March 24, 2015, 7:40 a.m. UTC
HT requires QoS/WMM, so unset HT capabilities for a station
whose association request does not include a valid WMM IE.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
---
 src/ap/ieee802_11_ht.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Jouni Malinen March 25, 2015, 8:26 p.m. UTC | #1
On Tue, Mar 24, 2015 at 09:40:06AM +0200, Ilan Peer wrote:
> HT requires QoS/WMM, so unset HT capabilities for a station
> whose association request does not include a valid WMM IE.

Thanks, applied.
diff mbox

Patch

diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c
index 4b0653d..d3e2c67 100644
--- a/src/ap/ieee802_11_ht.c
+++ b/src/ap/ieee802_11_ht.c
@@ -312,10 +312,12 @@  void hostapd_2040_coex_action(struct hostapd_data *hapd,
 u16 copy_sta_ht_capab(struct hostapd_data *hapd, struct sta_info *sta,
 		      const u8 *ht_capab, size_t ht_capab_len)
 {
-	/* Disable HT caps for STAs associated to no-HT BSSes. */
+	/* Disable HT caps for STAs associated to no-HT BSSes, or for stations
+	 * that did not specify a valid WMM IE in the association request
+	 */
 	if (!ht_capab ||
 	    ht_capab_len < sizeof(struct ieee80211_ht_capabilities) ||
-	    hapd->conf->disable_11n) {
+	    !(sta->flags & WLAN_STA_WMM) || hapd->conf->disable_11n) {
 		sta->flags &= ~WLAN_STA_HT;
 		os_free(sta->ht_capabilities);
 		sta->ht_capabilities = NULL;