[PATCH 1/2] Explicitly require WMM to be enabled if HT (11n) or VHT (11ac) is enabled
Jouni Malinen
j at w1.fi
Sat Feb 25 00:28:29 PST 2017
On Wed, Feb 22, 2017 at 04:54:08PM +0000, Nick Lowe wrote:
> Explicitly require WMM to be enabled if HT (11n) or VHT
> (11ac) is enabled. This adds a check where VHT is enabled that was previously
> missing. WMM would previously silently be enabled where HT was enabled.
Could you please clarify why this would be a good thing to do?
> diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
> @@ -960,8 +960,10 @@ static int hostapd_setup_bss(struct hostapd_data
> *hapd, int first)
> - if (conf->wmm_enabled < 0)
> - conf->wmm_enabled = hapd->iconf->ieee80211n;
> + if (!conf->wmm_enabled && (hapd->iconf->ieee80211n ||
> hapd->iconf->ieee80211ac)) {
> + wpa_printf(MSG_ERROR, "HT/VHT is enabled so WMM cannot be disabled");
> + return -1;
> + }
This looks quite broken. conf->wmm_enabled is initialized to -1 in
hostapd_config_default_bss(). If there is no explicit wmm_enabled
parameter in the configuration, this !conf->wmm_enabled would not be
true and as such, the default value (-1) would be left in place and that
would be interpreted as WMM being enabled by default regardless of
whether HT or VHT are being used.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list