]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita5fc39348fdd32896679405048f5b546bc82fefc
treed9f12bf2104c1c324011d719149559b963e7c1e0
parenta2d79324c2120f66702904dd51a68f82cffb1b4b
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