diff mbox series

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

Message ID 20220302222634.22185-11-quic_alokad@quicinc.com
State Changes Requested
Headers show
Series hostapd: MBSSID and EMA support | expand

Commit Message

Aloka Dixit March 2, 2022, 10:26 p.m. UTC
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@quicinc.com>
---
 src/ap/ieee802_11.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Jouni Malinen April 7, 2022, 8:46 p.m. UTC | #1
On Wed, Mar 02, 2022 at 02:26:31PM -0800, Aloka Dixit wrote:
> 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.

Please reference the published amendment instead of an older draft.

> diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
>  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);

Is there a reason for having these in a separate patch instead of
merging the changes into patch 5/13 that introduced this function in
this same patchset?
Aloka Dixit April 21, 2022, 6:16 p.m. UTC | #2
On 4/7/2022 1:46 PM, Jouni Malinen wrote:
> On Wed, Mar 02, 2022 at 02:26:31PM -0800, Aloka Dixit wrote:

>> @@ -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);
> 
> Is there a reason for having these in a separate patch instead of
> merging the changes into patch 5/13 that introduced this function in
> this same patchset?
>   

This part was added by me, a different author than the original function 
added by John, hence a separate patch.
Jouni Malinen April 21, 2022, 9:35 p.m. UTC | #3
On Thu, Apr 21, 2022 at 11:16:31AM -0700, Aloka Dixit wrote:
> This part was added by me, a different author than the original function
> added by John, hence a separate patch.

Since neither patch is in the hostap.git repository yet, I'd prefer to
see the patchset modified to be clearer and not try to split clearly
related functionality into independent patches.
diff mbox series

Patch

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