Commit 688b1ecf authored by Luciano Coelho's avatar Luciano Coelho Committed by Johannes Berg

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

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: d04b5ac9 ("cfg80211/mac80211: allow any interface to send channel switch notifications")
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent d2954457
...@@ -1053,8 +1053,6 @@ static void ieee80211_chswitch_post_beacon(struct ieee80211_sub_if_data *sdata) ...@@ -1053,8 +1053,6 @@ static void ieee80211_chswitch_post_beacon(struct ieee80211_sub_if_data *sdata)
sdata->csa_block_tx = false; sdata->csa_block_tx = false;
} }
cfg80211_ch_switch_notify(sdata->dev, &sdata->reserved_chandef);
sdata->vif.csa_active = false; sdata->vif.csa_active = false;
ifmgd->csa_waiting_bcn = false; ifmgd->csa_waiting_bcn = false;
...@@ -1066,6 +1064,8 @@ static void ieee80211_chswitch_post_beacon(struct ieee80211_sub_if_data *sdata) ...@@ -1066,6 +1064,8 @@ static void ieee80211_chswitch_post_beacon(struct ieee80211_sub_if_data *sdata)
&ifmgd->csa_connection_drop_work); &ifmgd->csa_connection_drop_work);
return; return;
} }
cfg80211_ch_switch_notify(sdata->dev, &sdata->reserved_chandef);
} }
void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success) void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment