[PATCH 10/13] mbssid: DTIM period configuration for EMA AP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Set the DTIM periods of non-transmitted profiles equal to the EMA
profile periodicity if those are not a multiple of the latter
already as recommended in IEEE P802.11ax/D8.0, October 2020,
Multiple BSSID configuration examples, AA.1 Introduction.

Signed-off-by: Aloka Dixit <quic_alokad@xxxxxxxxxxx>
---
 src/ap/ieee802_11.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 33db7b411a8a..3365b48fa639 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -7560,7 +7560,7 @@ size_t hostapd_eid_mbssid_len(struct hostapd_data *hapd, u32 frame_type,
 
 static u8 * hostapd_eid_mbssid_elem(struct hostapd_data *hapd, u8 *eid, u8 *end,
 				    u32 frame_type, u8 max_bssid_indicator,
-				    size_t *bss_index)
+				    size_t *bss_index, u8 elem_count)
 {
 	struct hostapd_data *tx_bss = hostapd_mbssid_get_tx_bss(hapd);
 	size_t i;
@@ -7601,6 +7601,9 @@ static u8 * hostapd_eid_mbssid_elem(struct hostapd_data *hapd, u8 *eid, u8 *end,
 		if (frame_type == WLAN_FC_STYPE_BEACON) {
 			*eid++ = 3;
 			*eid++ = i;
+			if (hapd->iconf->ema &&
+			    (conf->dtim_period % elem_count))
+				conf->dtim_period = elem_count;
 			*eid++ = conf->dtim_period;
 			*eid++ = 0xFF;
 		} else {
@@ -7686,7 +7689,7 @@ u8 * hostapd_eid_mbssid(struct hostapd_data *hapd, u8 *eid, u8 *end,
 		}
 		eid = hostapd_eid_mbssid_elem(hapd, eid, end, frame_type,
 					      hostapd_max_bssid_indicator(hapd),
-					      &bss_index);
+					      &bss_index, elem_count);
 	}
 	return eid;
 }
-- 
2.31.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux