]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add DSSS Parameter Set element only for 2.4 GHz
authorJurijs Soloveckis <jsoloveckis@maxlinear.com>
Wed, 1 Nov 2023 11:11:03 +0000 (11:11 +0000)
committerJouni Malinen <j@w1.fi>
Thu, 2 Nov 2023 14:16:53 +0000 (16:16 +0200)
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 <jsoloveckis@maxlinear.com>
src/ap/beacon.c

index 62cbf20ca34abb70bc143f56a67c66018ab69324..ea8c88d59cab45cb9cb0d1f25da3110fd985d150 100644 (file)
@@ -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;