]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Disable VHT/HE when WMM is not enabled
authorLavanya Suresh <lavaks@codeaurora.org>
Thu, 1 Apr 2021 17:25:39 +0000 (22:55 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 3 May 2021 14:27:22 +0000 (17:27 +0300)
When WMM is disabled, HT/VHT/HE capabilities should not be used for any
STA. If any STA advertises these capabilities, hostapd AP disables HT
capabilities in STA flags during STA assoc, but VHT/HE was not handled
similarly. This could allow a STA to associate in VHT/HE mode even in
WMM disable case.

To avoid this, disable VHT/HE capabilities similarly to HT during STA
association, if WMM is not enabled by the STA.

Signed-off-by: Lavanya Suresh <lavaks@codeaurora.org>
src/ap/ieee802_11_he.c
src/ap/ieee802_11_vht.c

index c27bb1fcdbd00e4d915a47cc0345164e5fb14a59..917ed946df3f63c9e03b3e236afdbaf555481ece 100644 (file)
@@ -434,8 +434,8 @@ u16 copy_sta_he_capab(struct hostapd_data *hapd, struct sta_info *sta,
                      enum ieee80211_op_mode opmode, const u8 *he_capab,
                      size_t he_capab_len)
 {
-       if (!he_capab || !hapd->iconf->ieee80211ax ||
-           hapd->conf->disable_11ax ||
+       if (!he_capab || !(sta->flags & WLAN_STA_WMM) ||
+           !hapd->iconf->ieee80211ax || hapd->conf->disable_11ax ||
            !check_valid_he_mcs(hapd, he_capab, opmode) ||
            ieee80211_invalid_he_cap_size(he_capab, he_capab_len) ||
            he_capab_len > sizeof(struct ieee80211_he_capabilities)) {
index d0370229c4179cbae8552b46b70af7dbc7b223ae..828f0abb5aad6446057fb30401b4ad150f43e55d 100644 (file)
@@ -171,7 +171,7 @@ u16 copy_sta_vht_capab(struct hostapd_data *hapd, struct sta_info *sta,
                       const u8 *vht_capab)
 {
        /* Disable VHT caps for STAs associated to no-VHT BSSes. */
-       if (!vht_capab ||
+       if (!vht_capab || !(sta->flags & WLAN_STA_WMM) ||
            !hapd->iconf->ieee80211ac || hapd->conf->disable_11ac ||
            !check_valid_vht_mcs(hapd->iface->current_mode, vht_capab)) {
                sta->flags &= ~WLAN_STA_VHT;