mbox series

[wireless-next,v3,0/2] wifi: mac80211: MLO handling for Dynamic VLAN

Message ID 20250310223528.3528897-1-muna.sinada@oss.qualcomm.com
Headers show
Series wifi: mac80211: MLO handling for Dynamic VLAN | expand

Message

Muna Sinada March 10, 2025, 10:35 p.m. UTC
Currently for AP_VLAN interfaces that are a part of a MLD master AP,
links are not created for the interface. Additionally, mac80211
handles duplicating multicast traffic on each link when a driver/hw
is not handling such action.

With the introduction of MLO, there are two areas where additional
handling is needed to enable Dynamic VLAN traffic: creating separate
links for AP_VLAN interface and enabling mac80211 to send multicast
Dynamic VLAN traffic on each link.

4addr mode + MLO is not currently supported.

v3:
 - rebase to cleanly apply to wireless-next

v2:
 - update Author signoff to new email

Muna Sinada (2):
  wifi: mac80211: Create separate links for VLAN interfaces
  wifi: mac80211: VLAN traffic in multicast path

 net/mac80211/chan.c        |  3 ++
 net/mac80211/ieee80211_i.h |  3 ++
 net/mac80211/iface.c       | 22 +++++++++-
 net/mac80211/link.c        | 90 ++++++++++++++++++++++++++++++++++++--
 net/mac80211/tx.c          |  6 ++-
 5 files changed, 116 insertions(+), 8 deletions(-)

Comments

Johannes Berg March 11, 2025, 10:29 a.m. UTC | #1
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
Muna Sinada March 11, 2025, 11:50 p.m. UTC | #2
On 3/11/2025 3:29 AM, Johannes Berg wrote:
> 
> 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
for_each_valid_link() is a cfg80211 macro that utilizes wdev to
access valid_links and links array. Using this macro with &sdata->vif
will not work since, links array located in sdata and is named "link"
and valid_links is located inside vif. 

Should I will go ahead and define a new macro that is similar but
utilizes sdata or should I stick to using for_each_valid_link() and
pass in &sdata->wdev.