[PATCH] mac80211: notify channel switch at the end of ieee80211_chswitch_post_beacon()

Subsystems: mac80211, the rest

STALE4322d

2 messages, 2 authors, 2014-12-17 · open the first message on its own page

[PATCH] mac80211: notify channel switch at the end of ieee80211_chswitch_post_beacon()

From: Emmanuel Grumbach <hidden>
Date: 2014-12-16 14:15:52

From: Luciano Coelho <redacted>

The call to cfg80211_ch_switch_notify() should be at the end of the
ieee80211_chswitch_post_beacon() function, because it should only be
sent if everything succeeded.

Fixes: d04b5ac9e70b ("cfg80211/mac80211: allow any interface to send channel switch notifications")
Signed-off-by: Luciano Coelho <redacted>
Signed-off-by: Emmanuel Grumbach <redacted>
---
 net/mac80211/mlme.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 75a9bf5..0c6848e 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1053,8 +1053,6 @@ static void ieee80211_chswitch_post_beacon(struct ieee80211_sub_if_data *sdata)
 		sdata->csa_block_tx = false;
 	}
 
-	cfg80211_ch_switch_notify(sdata->dev, &sdata->reserved_chandef);
-
 	sdata->vif.csa_active = false;
 	ifmgd->csa_waiting_bcn = false;
 
@@ -1066,6 +1064,8 @@ static void ieee80211_chswitch_post_beacon(struct ieee80211_sub_if_data *sdata)
 				     &ifmgd->csa_connection_drop_work);
 		return;
 	}
+
+	cfg80211_ch_switch_notify(sdata->dev, &sdata->reserved_chandef);
 }
 
 void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success)
-- 
1.9.1

Re: [PATCH] mac80211: notify channel switch at the end of ieee80211_chswitch_post_beacon()

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2014-12-17 10:47:52

On Tue, 2014-12-16 at 16:01 +0200, Emmanuel Grumbach wrote:
From: Luciano Coelho <redacted>

The call to cfg80211_ch_switch_notify() should be at the end of the
ieee80211_chswitch_post_beacon() function, because it should only be
sent if everything succeeded.
Applied.

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help