[PATCH 1/2] Explicitly require WMM to be enabled if HT (11n) or VHT (11ac) is enabled

Nick Lowe nick.lowe at lugatech.com
Wed Feb 22 08:54:08 PST 2017


 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.
 Signed-off-by: Nick Lowe <nick.lowe at gmail.com>

---
 hostapd/hostapd.conf | 4 ++--
 src/ap/hostapd.c     | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
index c4eebff..89e61a1 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -516,7 +516,7 @@ wmm_ac_vo_acm=0
 # ieee80211n: Whether IEEE 802.11n (HT) is enabled
 # 0 = disabled (default)
 # 1 = enabled
-# Note: You will also need to enable WMM for full HT functionality.
+# Note: You will also need to enable WMM for HT functionality.
 # Note: hw_mode=g (2.4 GHz) and hw_mode=a (5 GHz) is used to specify the band.
 #ieee80211n=1

@@ -570,7 +570,7 @@ wmm_ac_vo_acm=0
 # ieee80211ac: Whether IEEE 802.11ac (VHT) is enabled
 # 0 = disabled (default)
 # 1 = enabled
-# Note: You will also need to enable WMM for full VHT functionality.
+# Note: You will also need to enable WMM for VHT functionality.
 # Note: hw_mode=a is used to specify that 5 GHz band is used with VHT.
 #ieee80211ac=1

diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index cf8a8cb..023c141 100644
--- 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)
  os_memcpy(hapd->own_addr, if_addr, ETH_ALEN);
  }

- 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;
+ }

 #ifdef CONFIG_IEEE80211R_AP
  if (is_zero_ether_addr(conf->r1_key_holder))
-- 
2.10.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Explicitly-require-WMM-to-be-enabled-if-HT-11n-or-VH.patch
Type: application/octet-stream
Size: 2013 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20170222/be7436c8/attachment.obj>


More information about the Hostap mailing list