Re: [PATCH 09/13] mbssid: set extended capabilities

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

 



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?

> +	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?!

>  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.

-- 
Jouni Malinen                                            PGP id EFC895FA

_______________________________________________
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