summaryrefslogtreecommitdiff
path: root/net/mac80211/link.c
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2023-01-25 14:01:02 +0300
committerJohannes Berg <johannes.berg@intel.com>2023-02-14 13:53:21 +0300
commit9288188438d85e22c23cfd6657ee8a801babc83c (patch)
treed01dd3bbf448472078443ecb0a2a9ce78db18987 /net/mac80211/link.c
parent015b8cc5e7c4d7bb671f1984d7b7338c310b185b (diff)
downloadlinux-9288188438d85e22c23cfd6657ee8a801babc83c.tar.xz
wifi: mac80211: move color collision detection report in a delayed work
Move color collision report in a dedicated delayed work and do not run it in interrupt context in order to rate-limit the number of events reported to userspace. Moreover grab wdev mutex in ieee80211_color_collision_detection_work routine since it is required by cfg80211_obss_color_collision_notify(). Tested-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Fixes: 5f9404abdf2a ("mac80211: add support for BSS color change") Link: https://lore.kernel.org/r/3f6cf60c892ad40c1cca4a55d62b1224ef1c6ce9.1674644379.git.lorenzo@kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/link.c')
-rw-r--r--net/mac80211/link.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/link.c b/net/mac80211/link.c
index d1f5a9f7c647..8c8869cc1fb4 100644
--- a/net/mac80211/link.c
+++ b/net/mac80211/link.c
@@ -39,6 +39,8 @@ void ieee80211_link_init(struct ieee80211_sub_if_data *sdata,
ieee80211_csa_finalize_work);
INIT_WORK(&link->color_change_finalize_work,
ieee80211_color_change_finalize_work);
+ INIT_DELAYED_WORK(&link->color_collision_detect_work,
+ ieee80211_color_collision_detection_work);
INIT_LIST_HEAD(&link->assigned_chanctx_list);
INIT_LIST_HEAD(&link->reserved_chanctx_list);
INIT_DELAYED_WORK(&link->dfs_cac_timer_work,
@@ -66,6 +68,7 @@ void ieee80211_link_stop(struct ieee80211_link_data *link)
if (link->sdata->vif.type == NL80211_IFTYPE_STATION)
ieee80211_mgd_stop_link(link);
+ cancel_delayed_work_sync(&link->color_collision_detect_work);
ieee80211_link_release_channel(link);
}