Search Linux Wireless

Re: [PATCH 1/3] wifi: cfg80211: Extend cfg80211_new_sta() for MLD AP

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

 



Hi,

> + * @mlo_params_valid: Indicates @assoc_link_id and @mld_addr fields are valid.
> + *	Drivers use this only in cfg80211_new_sta() calls when AP MLD's MLME/SME
> + *	is offload to driver. Drivers won't fill this information in
> + *	cfg80211_del_sta_sinfo(), get_station() and dump_station() callbacks.
> 
> + * @mld_addr: MLD address if the station is an MLD. Otherwise, set to all zeros.


> +	if (sinfo->mlo_params_valid) {
> +		if (nla_put_u8(msg, NL80211_ATTR_MLO_LINK_ID,
> +			       sinfo->assoc_link_id))
> +			goto nla_put_failure;
> +
> +		if (!is_zero_ether_addr(sinfo->mld_addr) &&
> +		    nla_put(msg, NL80211_ATTR_MLD_ADDR, ETH_ALEN,
> +			    sinfo->mld_addr))
> 


It'd be invalid, but now you could have mlo_params_valid == true &&
is_zero_ether_addr(sinfo->mld_addr), which would lead to a very strange
situation for userspace, it would see a link ID but no MLD address.

With the documented requirement that
	mlo_params_valid == (mld_addr is valid)

wouldn't it make sense to just remove mlo_params_valid, and lift the
is_zero_ether_addr() check to the outer condition?

johannes




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux