From 4d6eb9f2e2563d9e9fc709a5e9b577b61c0344b4 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 6 Apr 2018 23:29:11 +0300 Subject: [PATCH] Fix hostapd wmm_enabled setup on config reload path If there is no explicit wmm_enabled parameter in the configuration (i.e., conf->wmm_enabled == -1), the configuration reload path needs to initialize conf->wmm_enabled based on iconf->ieee80211n in hostapd_reload_bss() similarly to what is done in the initial startup case in hostapd_setup_bss(). This fixes issues with RSN capabilities being set incorrectly when WMM is supposed to get enabled and unexpectedly enabling WMM when it is not supposed to be enabled (HT disabled). Either of these issues could show up when asking hostapd to reload the configuration file (and when that file does not set wmm_enabled explicitly). Signed-off-by: Jouni Malinen --- src/ap/hostapd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index 12911dfd4..0b6db7bc2 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -82,6 +82,9 @@ static void hostapd_reload_bss(struct hostapd_data *hapd) if (!hapd->started) return; + if (hapd->conf->wmm_enabled < 0) + hapd->conf->wmm_enabled = hapd->iconf->ieee80211n; + #ifndef CONFIG_NO_RADIUS radius_client_reconfig(hapd->radius, hapd->conf->radius); #endif /* CONFIG_NO_RADIUS */