[PATCH 09/13] mbssid: set extended capabilities
Aloka Dixit
quic_alokad at quicinc.com
Thu May 5 11:52:47 PDT 2022
On 4/7/2022 1:44 PM, Jouni Malinen wrote:
> On Wed, Mar 02, 2022 at 02:26:30PM -0800, Aloka Dixit wrote:
>> Set extended capabilities as described in IEEE Std 802.11-2020
>> section 9.4.2.26 Extended Capabilities element.
>
> EMA is not defined in IEEE Std 802.11-2020, so this should also include
> IEEE Std 802.11ax-2021.
>
>> diff --git a/src/ap/beacon.c b/src/ap/beacon.c
>> +static u8 * hostapd_ext_capab_mbssid(struct hostapd_data *hapd, u8 *eid,
>> + u8 *eid_ext_cap, u8 ema_periodicity)
>> +{
>> + size_t len;
>> +
>> + if (eid == eid_ext_cap)
>> + return eid;
>> +
>> + len = eid_ext_cap[1];
>> + eid_ext_cap += 2;
>> +
>> + if (!hapd->iconf->mbssid && len >= 3)
>> + eid_ext_cap[2] &= ~0x40;
>> +
>> + if (!hapd->iconf->ema && len >= 11)
>> + eid_ext_cap[10] &= ~0x08;
> ...
>
> This looks really confusing. Why would this separate function be used to
> modify what hostapd_eid_ext_capab() wrote instead of modifying
> hostapd_eid_ext_capab() with these extensions?
>
Will try to add the code in the existing function itself.
>> + if (hapd->iconf->mbssid && ema_periodicity <= 1) {
>> + while (len < 11) {
>> + *eid++ = 0x00;
>> + len++;
>> + }
>
> And what exactly is this trying to do? Clear a lot of unrelated bits?!
>
Set the "complete list of non-tx profiles bit when applicable
The second part which clears bunch of bits is because we saw issues
during inter-op with some specific client devices which failed in
association if MBSSID/EMA extended capabilities bit were set to '1' when
MBSSID was not actually in use.
>> static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
>> + ext_cap_pos = pos;
>> pos = hostapd_eid_ext_capab(hapd, pos);
>> + pos = hostapd_ext_capab_mbssid(hapd, pos, ext_cap_pos, 1);
>
>> @@ -1656,7 +1687,10 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
>> + ext_cap_pos = tailpos;
>> tailpos = hostapd_eid_ext_capab(hapd, tailpos);
>> + tailpos = hostapd_ext_capab_mbssid(hapd, tailpos, ext_cap_pos,
>> + params->mbssid_elem_count);
>
> What about other frames than Beacon and Probe Response frames?
> hostapd_eid_ext_capab() is used for (Re)Association Response frames as
> well. This would not modify hostapd_build_ap_extra_ies() either.
>
Got it, will fix this.
Thanks.
More information about the Hostap
mailing list