Search Linux Wireless

Re: [wireless-next v3 1/2] wifi: mac80211: Create separate links for VLAN interfaces

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

 



On Mon, 2025-03-10 at 15:35 -0700, Muna Sinada wrote:
> 
>  		/* no need to tell driver, but set carrier and chanctx */
>  		if (sdata->bss->active) {
> -			ieee80211_link_vlan_copy_chanctx(&sdata->deflink);
> +			struct ieee80211_link_data *link;
> +			unsigned long valid_links = sdata->vif.valid_links;
> +
> +			if (valid_links) {
> +				for_each_set_bit(link_id, &valid_links,
> +						 IEEE80211_MLD_MAX_NUM_LINKS) {
> +					link = sdata_dereference(sdata->link[link_id],
> +								 sdata);
> +					ieee80211_link_vlan_copy_chanctx(link);
> +				}
> +			} else {
> +				ieee80211_link_vlan_copy_chanctx(&sdata->deflink);
> +			}
> +

Can this not use for_each_valid_link()? I think
for_each_valid_link(&sdata->vif, link_id) should work? If not some new
macro? I don't like open-coding this "if (valid_links)" etc. everywhere.

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