2021-09-16 02:55:24

by Aloka Dixit

[permalink] [raw]
Subject: [PATCH v12 4/4] mac80211: MBSSID channel switch

From: John Crispin <[email protected]>

Trigger ieee80211_csa_finish() on the non-transmitting interfaces
when channel switch concludes on the transmitting interface.

Signed-off-by: John Crispin <[email protected]>
Co-developed-by: Aloka Dixit <[email protected]>
Signed-off-by: Aloka Dixit <[email protected]>
---
v12: No changes.

net/mac80211/cfg.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 23fa0bb49be2..88fbed46e1bc 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3271,8 +3271,19 @@ void ieee80211_csa_finish(struct ieee80211_vif *vif)
{
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);

- ieee80211_queue_work(&sdata->local->hw,
- &sdata->csa_finalize_work);
+ if (vif->mbssid_tx_vif == vif) {
+ struct ieee80211_sub_if_data *child, *tmp;
+
+ list_for_each_entry_safe(child, tmp,
+ &sdata->local->interfaces, list)
+ if (child != sdata && child->vif.mbssid_tx_vif == vif &&
+ ieee80211_sdata_running(child)) {
+ ieee80211_queue_work(&child->local->hw,
+ &child->csa_finalize_work);
+ }
+ }
+
+ ieee80211_queue_work(&sdata->local->hw, &sdata->csa_finalize_work);
}
EXPORT_SYMBOL(ieee80211_csa_finish);

--
2.31.1


2021-09-28 09:49:45

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH v12 4/4] mac80211: MBSSID channel switch

On Wed, 2021-09-15 at 19:54 -0700, Aloka Dixit wrote:
>
> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
> index 23fa0bb49be2..88fbed46e1bc 100644
> --- a/net/mac80211/cfg.c
> +++ b/net/mac80211/cfg.c
> @@ -3271,8 +3271,19 @@ void ieee80211_csa_finish(struct ieee80211_vif *vif)
>  {
>   struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
>  
>
>
>
> - ieee80211_queue_work(&sdata->local->hw,
> - &sdata->csa_finalize_work);
> + if (vif->mbssid_tx_vif == vif) {
> + struct ieee80211_sub_if_data *child, *tmp;
> +
> + list_for_each_entry_safe(child, tmp,
> + &sdata->local->interfaces, list)

I don't see any reason to believe that this list iteration should be
safe?

johannes