staging: wfx: repair wfx_flush()
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Wed, 1 Apr 2020 11:04:01 +0000 (13:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2020 06:55:37 +0000 (08:55 +0200)
commit4c6b3837c6dc0d9e5f9ec910da2e36349beea733
tree7298ea6c467be03e12cc55377c59ecf7b92f1297
parent7db856797f2537cb3022a655e6543b16fcad13c2
staging: wfx: repair wfx_flush()

Until now, wfx_flush() flushed queue for while device instead of only
the queue of the intended vif. It sometime failed with a timeout, but
this error was not reported.

Moreover, if the device was frozen, wfx_flush didn't do anything and it
results a potential warning (and maybe a resource leak) when the frozen
device was unregistered.

We can also notice that wfx_tx_queues_wait_empty_vif() did only exist to
work around the broken feature of wfx_flush().

This patch repair wfx_flush() and therefore drop
wfx_tx_queues_wait_empty_vif().

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200401110405.80282-29-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/data_tx.c
drivers/staging/wfx/data_tx.h
drivers/staging/wfx/main.c
drivers/staging/wfx/queue.c
drivers/staging/wfx/queue.h
drivers/staging/wfx/sta.c
drivers/staging/wfx/sta.h