[PATCH V2] HE: fix hostapd_get_he_capab()

Sven Eckelmann sven at narfation.org
Wed Jun 26 23:40:02 PDT 2019


On Monday, 17 June 2019 14:16:35 CEST John Crispin wrote:
[...]
> diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
> index 12c004f88..1d302559e 100644
> --- a/src/common/ieee802_11_defs.h
> +++ b/src/common/ieee802_11_defs.h
> @@ -2109,7 +2109,7 @@ struct ieee80211_he_capabilities {
>  	u8 he_phy_capab_info[11];
>  	/* Followed by 4, 8, or 12 octets of Supported HE-MCS And NSS Set field
>  	* and optional variable length PPE Thresholds field. */
> -	u8 optional[];
> +	u8 optional[37];
>  } STRUCT_PACKED;
>  
>  struct ieee80211_he_operation {
> 
Ok, so you add here enough room for HE_MAX_MCS_CAPAB_SIZE and 
HE_MAX_PPET_CAPAB_SIZE. In that case, the buffer allocation for the mesh part 
in wpa_supplicant/mesh_mpm.c could be simplified from 

    		buf_len += 3 +
    			   HE_MAX_MAC_CAPAB_SIZE +
    			   HE_MAX_PHY_CAPAB_SIZE +
    			   HE_MAX_MCS_CAPAB_SIZE +
    			   HE_MAX_PPET_CAPAB_SIZE;

to

    		buf_len += 3 + sizeof(struct ieee80211_he_capabilities);

after your patch was applied.

Kind regards,
	Sven
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20190627/8f0cf0b5/attachment.sig>


More information about the Hostap mailing list