diff mbox series

[v2,4/5] AP: Restrict Vendor VHT to 2.4 GHz only

Message ID 1591078468-19043-4-git-send-email-rmanohar@codeaurora.org
State Accepted
Headers show
Series [v2,1/5] nl80211: Fetch HE 6 GHz capability from driver | expand

Commit Message

Rajkumar Manoharan June 2, 2020, 6:14 a.m. UTC
Vendor VHT IE is used only on 2.4 GHz band. Hence restrict the usage
of vendor VHT element to 2.4 GHz. This will ensure that invalid / wrong
user config will not impact beacon data in other than 2.4 GHz band.

Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
---
 src/ap/ieee802_11_vht.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/src/ap/ieee802_11_vht.c b/src/ap/ieee802_11_vht.c
index f50f142dc0bb..0d68c8963f90 100644
--- a/src/ap/ieee802_11_vht.c
+++ b/src/ap/ieee802_11_vht.c
@@ -428,6 +428,10 @@  u8 * hostapd_eid_vendor_vht(struct hostapd_data *hapd, u8 *eid)
 	if (!hapd->iface->current_mode)
 		return eid;
 
+	/* Vendor VHT is applicable only to 2.4 GHz */
+	if (hapd->iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
+		return eid;
+
 	*pos++ = WLAN_EID_VENDOR_SPECIFIC;
 	*pos++ = (5 +		/* The Vendor OUI, type and subtype */
 		  2 + sizeof(struct ieee80211_vht_capabilities) +