[PATCH] DSSS Parameter Set element is added for 2.4GHz only

Jurijs Soloveckis jsoloveckis at maxlinear.com
Wed Nov 1 04:11:03 PDT 2023


>From IEEE802.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.

Signed-off-by: Jurijs Soloveckis <jsoloveckis at maxlinear.com>
---
 src/ap/beacon.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index 1d3b96ac7..8b2093438 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -87,9 +87,14 @@ static u8 ieee802_11_erp_info(struct hostapd_data *hapd)

 static u8 * hostapd_eid_ds_params(struct hostapd_data *hapd, u8 *eid)
 {
-       *eid++ = WLAN_EID_DS_PARAMS;
-       *eid++ = 1;
-       *eid++ = hapd->iconf->channel;
+       enum hostapd_hw_mode hw_mode = hapd->iconf->hw_mode;
+       bool is_24ghz = hw_mode == HOSTAPD_MODE_IEEE80211G ||
+               hw_mode == HOSTAPD_MODE_IEEE80211B;
+       if (is_24ghz) {
+               *eid++ = WLAN_EID_DS_PARAMS;
+               *eid++ = 1;
+               *eid++ = hapd->iconf->channel;
+       }
        return eid;
 }

--
2.17.1




More information about the Hostap mailing list