OSDN Git Service

staging: wfx: call wfx_do_unjoin() synchronously
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Fri, 10 Apr 2020 13:32:23 +0000 (15:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2020 12:42:36 +0000 (14:42 +0200)
commit836a8fc3f5073b204135a088908b15d868030c4c
treed9f12bf2104c1c324011d719149559b963e7c1e0
parentb4d74f7ad1cdfb0099a4c844d3692ccd94b144aa
staging: wfx: call wfx_do_unjoin() synchronously

Currently, wfx_do_unjoin() are called by the mean of work queues.
However, the contexts from where they are called are not atomic. So
there is no reason to not call it synchronously.

This change will simplify the code. Notice two main changes:
   - There no more reason to lock tx queue before to run
     wfx_do_unjoin(). We can lock the tx queue directly from
     wfx_do_unjoin().
   - Most of the time, wfx_do_unjoin_work() was called with conf_mutex
     held. This patch remove lock of conf_mutex in wfx_do_unjoin_work()
     and ensure that conf_mutex is always held whatever the context.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200410133239.438347-4-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/sta.c
drivers/staging/wfx/wfx.h