]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HE: Do not add SPR IE if sr_control is set to 0
authorJohn Crispin <john@phrozen.org>
Fri, 3 May 2019 13:13:46 +0000 (15:13 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 4 May 2019 21:58:25 +0000 (00:58 +0300)
If none of the sr_control bits are set, we do not neet to add the IE to
the Beacon frame.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
src/ap/ieee802_11_he.c

index 0dbfc7019c193304b1f9dc2f4c51878c9d93fc77..d7b2fb7afe03656dd3339f365c9854f6966159ef 100644 (file)
@@ -136,6 +136,9 @@ u8 * hostapd_eid_spatial_reuse(struct hostapd_data *hapd, u8 *eid)
        u8 *pos = eid, *spr_param;
        u8 sz = 1;
 
+       if (!hapd->iface->conf->spr.sr_control)
+               return eid;
+
        if (hapd->iface->conf->spr.sr_control &
            SPATIAL_REUSE_NON_SRG_OFFSET_PRESENT)
                sz++;