A VHT STA is a HT STA. If a VHT STA has an invalid HT Capabilities
element, the HT capability of the STA is deactivated but the VHT
capability is still activated and the element copied.
Deactivate the VHT capability of a STA if it is not a HT STA.
Signed-off-by: Pablo Martin-Gomez <pmartin-gomez@freebox.fr>
/* Disable VHT caps for STAs associated to no-VHT BSSes. */
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)) {
+ !check_valid_vht_mcs(hapd->iface->current_mode, vht_capab) ||
+ !(sta->flags & WLAN_STA_HT)) {
sta->flags &= ~WLAN_STA_VHT;
os_free(sta->vht_capabilities);
sta->vht_capabilities = NULL;