From b505ef7e96fcbb929b8be2b5330fa840e6b495e0 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Fri, 3 May 2019 15:13:46 +0200 Subject: [PATCH] HE: Do not add SPR IE if sr_control is set to 0 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 Signed-off-by: John Crispin --- src/ap/ieee802_11_he.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ap/ieee802_11_he.c b/src/ap/ieee802_11_he.c index 0dbfc7019..d7b2fb7af 100644 --- a/src/ap/ieee802_11_he.c +++ b/src/ap/ieee802_11_he.c @@ -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++;