mbox series

[v2,0/2] wifi: cfg80211/mac80211: add link_id handling in AP channel switch during Multi-Link Operation

Message ID 20230925115822.12131-1-quic_adisi@quicinc.com
Headers show
Series wifi: cfg80211/mac80211: add link_id handling in AP channel switch during Multi-Link Operation | expand

Message

Aditya Kumar Singh Sept. 25, 2023, 11:58 a.m. UTC
Currently, during channel switch, deflink (or link_id 0) is always
considered. However, with Multi-Link Operation (MLO), there is a
need to handle link specific data structures based on the actual
operational link_id during channel switch operation.

Hence, add support for the same. Non-MLO based operations will use
link_id as 0 or deflink member as applicable.

While at it, beacon count down now needs to be updated on proper
link_id's beacon, do that as well.


Aditya Kumar Singh (2):
  wifi: cfg80211/mac80211: add support for AP channel switch with MLO
  wifi: mac80211: update beacon counters per link basis
---
v2: * reabsed on ToT
    * removed unwanted locking sequence during cancelling CSA work handler
      since now locking is moved to wiphy level, that part is uncessary now.
---
 drivers/net/wireless/ath/ath10k/mac.c         |   4 +-
 drivers/net/wireless/ath/ath10k/wmi.c         |   2 +-
 drivers/net/wireless/ath/ath11k/mac.c         |   2 +-
 drivers/net/wireless/ath/ath11k/wmi.c         |   2 +-
 drivers/net/wireless/ath/ath12k/wmi.c         |   2 +-
 drivers/net/wireless/ath/ath9k/beacon.c       |   2 +-
 .../net/wireless/ath/ath9k/htc_drv_beacon.c   |   2 +-
 .../net/wireless/intel/iwlwifi/mvm/mac-ctxt.c |   6 +-
 .../wireless/intel/iwlwifi/mvm/time-event.c   |   2 +-
 .../net/wireless/marvell/mwifiex/cfg80211.c   |   3 +-
 drivers/net/wireless/mediatek/mt76/mac80211.c |   2 +-
 .../net/wireless/mediatek/mt76/mt7615/mcu.c   |   2 +-
 .../net/wireless/mediatek/mt76/mt7915/mcu.c   |   2 +-
 .../net/wireless/mediatek/mt76/mt7996/mcu.c   |   2 +-
 drivers/net/wireless/ti/wlcore/event.c        |   2 +-
 drivers/net/wireless/virtual/mac80211_hwsim.c |   2 +-
 include/net/cfg80211.h                        |   3 +-
 include/net/mac80211.h                        |   7 +-
 net/mac80211/cfg.c                            | 113 +++++++++++-------
 net/mac80211/ibss.c                           |   2 +-
 net/mac80211/ieee80211_i.h                    |   3 +-
 net/mac80211/mesh.c                           |   2 +-
 net/mac80211/tx.c                             |  14 ++-
 net/wireless/nl80211.c                        |   2 +-
 net/wireless/rdev-ops.h                       |   7 +-
 net/wireless/trace.h                          |  12 +-
 26 files changed, 124 insertions(+), 80 deletions(-)


base-commit: 5ee7b2ea07cc6972bc505103f5d483943754a601

Comments

Johannes Berg Sept. 25, 2023, 1:12 p.m. UTC | #1
On Mon, 2023-09-25 at 17:28 +0530, Aditya Kumar Singh wrote:
> 
> -void ieee80211_csa_finish(struct ieee80211_vif *vif)
> +void ieee80211_csa_finish(struct ieee80211_vif *vif, unsigned int link_id)
>  {
>  	struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
>  	struct ieee80211_local *local = sdata->local;
> +	struct ieee80211_link_data *link_data;
> +
> +	if (WARN_ON(link_id > IEEE80211_MLD_MAX_NUM_LINKS))
> +		return;

>=.

You also have that in the other patch.

johannes
Johannes Berg Sept. 25, 2023, 1:21 p.m. UTC | #2
On Mon, 2023-09-25 at 18:49 +0530, Aditya Kumar Singh wrote:
> > 
> > Perhaps we should just get rid of sdata_dereference() entirely, after
> > all, it's the same now, just the arguments are switched for no good
> > reason.
> Yup agreed. Are you already aware of any WIP in this regards? If not, I 
> can take care for the CSA part at least in same series (in a different 
> patch obviously :) )

No, I was just thinking out loud now :)

It'd be a trivial spatch, but I guess it'd be nicer to not have all that
"sdata->local->hw.wiphy" in there if there's already another local or
even wiphy variable in the function. And then while that's probably
still possible in spatch, it's no longer trivial ;-)

johannes
Aditya Kumar Singh Sept. 25, 2023, 1:27 p.m. UTC | #3
On 9/25/23 18:51, Johannes Berg wrote:
> On Mon, 2023-09-25 at 18:49 +0530, Aditya Kumar Singh wrote:
>>>
>>> Perhaps we should just get rid of sdata_dereference() entirely, after
>>> all, it's the same now, just the arguments are switched for no good
>>> reason.
>> Yup agreed. Are you already aware of any WIP in this regards? If not, I
>> can take care for the CSA part at least in same series (in a different
>> patch obviously :) )
> 
> No, I was just thinking out loud now :)
Sure.

> 
> It'd be a trivial spatch, but I guess it'd be nicer to not have all that
> "sdata->local->hw.wiphy" in there if there's already another local or
> even wiphy variable in the function. And then while that's probably
> still possible in spatch, it's no longer trivial ;-)
Haha! Okay, let me see what I can do.