Search Linux Wireless

Re: [RFC v2] cfg80211: Indicate MLO connection info in connect and roam callbacks

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

 



On Mon, 2022-06-06 at 23:01 +0530, Veerendranath Jakkam wrote:

> +	if (cr->status == WLAN_STATUS_SUCCESS) {
> +		for_each_valid_link(cr, link) {
> +			if (!cr->links[link].bss)
> +				break;
> +		}
> +
> +		WARN_ON_ONCE((!cr->valid_links && link != 1) ||
> +			     (cr->valid_links &&
> +			      link != ARRAY_SIZE(wdev->links)));
> +

I will say I'm not super happy with using the link variable after the
loop, that always feels a bit magic to me, especially if the loop is
hidden like that...

But I guess I don't see a lot of alternatives here, other than open-
coding it, or keeping track of "how many BSSes do I have".

Actually, for the MLO case, is this even valid? link[14] could be set,
so you wouldn't break, ending up with link==15? Or am I confused?

Anyway, looks good to me.

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