hostapd: Disable VHT/HE when WMM is not enabled
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>
This commit is contained in:
parent
15b1831a2c
commit
9c6b0a9416
2 changed files with 3 additions and 3 deletions
|
@ -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,
|
enum ieee80211_op_mode opmode, const u8 *he_capab,
|
||||||
size_t he_capab_len)
|
size_t he_capab_len)
|
||||||
{
|
{
|
||||||
if (!he_capab || !hapd->iconf->ieee80211ax ||
|
if (!he_capab || !(sta->flags & WLAN_STA_WMM) ||
|
||||||
hapd->conf->disable_11ax ||
|
!hapd->iconf->ieee80211ax || hapd->conf->disable_11ax ||
|
||||||
!check_valid_he_mcs(hapd, he_capab, opmode) ||
|
!check_valid_he_mcs(hapd, he_capab, opmode) ||
|
||||||
ieee80211_invalid_he_cap_size(he_capab, he_capab_len) ||
|
ieee80211_invalid_he_cap_size(he_capab, he_capab_len) ||
|
||||||
he_capab_len > sizeof(struct ieee80211_he_capabilities)) {
|
he_capab_len > sizeof(struct ieee80211_he_capabilities)) {
|
||||||
|
|
|
@ -171,7 +171,7 @@ u16 copy_sta_vht_capab(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
const u8 *vht_capab)
|
const u8 *vht_capab)
|
||||||
{
|
{
|
||||||
/* Disable VHT caps for STAs associated to no-VHT BSSes. */
|
/* 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 ||
|
!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_VHT;
|
sta->flags &= ~WLAN_STA_VHT;
|
||||||
|
|
Loading…
Reference in a new issue