diff mbox series

DSSS Parameter Set element is added for 2.4GHz only

Message ID DM4PR19MB6173462F8EC6CBCC07195DE1A8A7A@DM4PR19MB6173.namprd19.prod.outlook.com
State Accepted
Headers show
Series DSSS Parameter Set element is added for 2.4GHz only | expand

Commit Message

Jurijs Soloveckis Nov. 1, 2023, 11:11 a.m. UTC
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@maxlinear.com>
---
 src/ap/beacon.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

--
2.17.1

Comments

Jouni Malinen Nov. 2, 2023, 2:46 p.m. UTC | #1
On Wed, Nov 01, 2023 at 11:11:03AM +0000, Jurijs Soloveckis wrote:
> 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.

Thanks, applied with somewhat modified design. Please note that this
email was whitespace damaged so it did not apply and I had to do the
edits manually.
diff mbox series

Patch

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