Commit b38579ae authored by Johannes Berg's avatar Johannes Berg

wifi: mac80211: move color change finalize to wiphy work

Again this should be per link and will get cancellation
issues, move it to a wiphy work.
Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent d7074be6
...@@ -4745,7 +4745,8 @@ static int ieee80211_color_change_finalize(struct ieee80211_sub_if_data *sdata) ...@@ -4745,7 +4745,8 @@ static int ieee80211_color_change_finalize(struct ieee80211_sub_if_data *sdata)
return 0; return 0;
} }
void ieee80211_color_change_finalize_work(struct work_struct *work) void ieee80211_color_change_finalize_work(struct wiphy *wiphy,
struct wiphy_work *work)
{ {
struct ieee80211_sub_if_data *sdata = struct ieee80211_sub_if_data *sdata =
container_of(work, struct ieee80211_sub_if_data, container_of(work, struct ieee80211_sub_if_data,
...@@ -4786,7 +4787,7 @@ void ieee80211_color_change_finish(struct ieee80211_vif *vif) ...@@ -4786,7 +4787,7 @@ void ieee80211_color_change_finish(struct ieee80211_vif *vif)
{ {
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
ieee80211_queue_work(&sdata->local->hw, wiphy_work_queue(sdata->local->hw.wiphy,
&sdata->deflink.color_change_finalize_work); &sdata->deflink.color_change_finalize_work);
} }
EXPORT_SYMBOL_GPL(ieee80211_color_change_finish); EXPORT_SYMBOL_GPL(ieee80211_color_change_finish);
......
...@@ -997,7 +997,7 @@ struct ieee80211_link_data { ...@@ -997,7 +997,7 @@ struct ieee80211_link_data {
struct cfg80211_chan_def csa_chandef; struct cfg80211_chan_def csa_chandef;
struct work_struct color_change_finalize_work; struct wiphy_work color_change_finalize_work;
struct delayed_work color_collision_detect_work; struct delayed_work color_collision_detect_work;
u64 color_bitmap; u64 color_bitmap;
...@@ -1994,7 +1994,8 @@ int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, ...@@ -1994,7 +1994,8 @@ int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_csa_settings *params); struct cfg80211_csa_settings *params);
/* color change handling */ /* color change handling */
void ieee80211_color_change_finalize_work(struct work_struct *work); void ieee80211_color_change_finalize_work(struct wiphy *wiphy,
struct wiphy_work *work);
void ieee80211_color_collision_detection_work(struct work_struct *work); void ieee80211_color_collision_detection_work(struct work_struct *work);
/* interface handling */ /* interface handling */
......
...@@ -535,9 +535,9 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, bool going_do ...@@ -535,9 +535,9 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, bool going_do
mutex_unlock(&local->mtx); mutex_unlock(&local->mtx);
sdata_unlock(sdata); sdata_unlock(sdata);
cancel_work_sync(&sdata->deflink.color_change_finalize_work);
wiphy_work_cancel(local->hw.wiphy, &sdata->deflink.csa_finalize_work); wiphy_work_cancel(local->hw.wiphy, &sdata->deflink.csa_finalize_work);
wiphy_work_cancel(local->hw.wiphy,
&sdata->deflink.color_change_finalize_work);
wiphy_delayed_work_cancel(local->hw.wiphy, wiphy_delayed_work_cancel(local->hw.wiphy,
&sdata->deflink.dfs_cac_timer_work); &sdata->deflink.dfs_cac_timer_work);
......
...@@ -39,7 +39,7 @@ void ieee80211_link_init(struct ieee80211_sub_if_data *sdata, ...@@ -39,7 +39,7 @@ void ieee80211_link_init(struct ieee80211_sub_if_data *sdata,
wiphy_work_init(&link->csa_finalize_work, wiphy_work_init(&link->csa_finalize_work,
ieee80211_csa_finalize_work); ieee80211_csa_finalize_work);
INIT_WORK(&link->color_change_finalize_work, wiphy_work_init(&link->color_change_finalize_work,
ieee80211_color_change_finalize_work); ieee80211_color_change_finalize_work);
INIT_DELAYED_WORK(&link->color_collision_detect_work, INIT_DELAYED_WORK(&link->color_collision_detect_work,
ieee80211_color_collision_detection_work); ieee80211_color_collision_detection_work);
......
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