wlcore: tx_flush - optimize flow and force Tx during the flush
authorArik Nemtsov <arik@wizery.com>
Sun, 29 Jul 2012 09:18:32 +0000 (12:18 +0300)
committerLuciano Coelho <luca@coelho.fi>
Thu, 27 Sep 2012 09:13:51 +0000 (12:13 +0300)
commitf83e54134a6d38437ddee0fda96692a6b0c33b0e
tree6e3469f9ee859bb3d7ad7459aff235af69f0e31e
parent958e303abba61bad165a96e22e138c4763047df2
wlcore: tx_flush - optimize flow and force Tx during the flush

Force Tx during the flush if there are packets pending in the driver.
This actually solves a bug where we would get called from the mac80211
wq context, which would prevent tx_work from getting queued, even when
the mutex is unlocked.

Don't stop the queues needlessly if there's nothing to flush. Use a
larger delay when sleeping to give the driver a chance to flush and
avoid cpu busy looping. Re-arrange the loop so the last iteration is
not wasted.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
drivers/net/wireless/ti/wlcore/tx.c