From 8056b79ff1e5d746a82c2ea12011e69e99c11d3d Mon Sep 17 00:00:00 2001 From: Jurijs Soloveckis Date: Wed, 1 Nov 2023 11:11:03 +0000 Subject: [PATCH] Add DSSS Parameter Set element only for 2.4 GHz From IEEE 802.11: The DSSS Parameter Set element is present within Beacon frames generated by STAs using Clause 15, Clause 16, and Clause 18 PHYs. The element is present within Beacon frames generated by STAs using a Clause 19 PHY in the 2.4 GHz band. Same is applied to the Probe Response frame. Do not include the DSSS Parameters Set element when operating on other bands. Signed-off-by: Jurijs Soloveckis --- src/ap/beacon.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ap/beacon.c b/src/ap/beacon.c index 62cbf20ca..ea8c88d59 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -87,6 +87,12 @@ static u8 ieee802_11_erp_info(struct hostapd_data *hapd) static u8 * hostapd_eid_ds_params(struct hostapd_data *hapd, u8 *eid) { + enum hostapd_hw_mode hw_mode = hapd->iconf->hw_mode; + + if (hw_mode != HOSTAPD_MODE_IEEE80211G && + hw_mode != HOSTAPD_MODE_IEEE80211B) + return eid; + *eid++ = WLAN_EID_DS_PARAMS; *eid++ = 1; *eid++ = hapd->iconf->channel;