mbox series

[00/14] wifi: work cleanups part 1

Message ID 20230606124933.181107-1-johannes@sipsolutions.net
Headers show
Series wifi: work cleanups part 1 | expand

Message

Johannes Berg June 6, 2023, 12:49 p.m. UTC
This is the first part of work cleanups, in particular this also
fixes the SMPS work deadlock issue with multi-link, since the wiphy
works are canceled more easily.

I'm planning on taking this into the tree and then building on it
for further simplifications - once most the works are converted
(except mac80211 restart hw, I think; help welcome) and we see that
everything holds the wiphy_lock(), we can start cleaning up all the
locking...

johannes

Comments

Johannes Berg June 6, 2023, 1:08 p.m. UTC | #1
On Tue, 2023-06-06 at 14:49 +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> This work can now trivially be converted, it behaves
> identical either way.
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
>  net/wireless/core.c    | 6 +++---
>  net/wireless/core.h    | 2 +-
>  net/wireless/nl80211.c | 3 ++-
>  3 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/net/wireless/core.c b/net/wireless/core.c
> index 3b37bbc4e8d2..56b7d4404eed 100644
> --- a/net/wireless/core.c
> +++ b/net/wireless/core.c
> @@ -365,7 +365,8 @@ static void cfg80211_destroy_iface_wk(struct work_struct *work)
>  	rtnl_unlock();
>  }
>  
> -static void cfg80211_sched_scan_stop_wk(struct work_struct *work)
> +static void cfg80211_sched_scan_stop_wk(struct wiphy *wiphy,
> +					struct wiphy_work *work)
>  {
>  	struct cfg80211_registered_device *rdev;
>  	struct cfg80211_sched_scan_request *req, *tmp;
> 

In this function, of course, the locking needs to be removed, though
this other patch just changed it:

https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git/commit/?id=3e54ed8247c94c8bdf370bd872bd9dfe72b1b12b

So need to merge back wireless or something first. Or maybe just live
with the merge conflict.

johannes