• Arik Nemtsov's avatar
    wlcore: tx_flush - optimize flow and force Tx during the flush · f83e5413
    Arik Nemtsov authored
    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: default avatarArik Nemtsov <arik@wizery.com>
    Signed-off-by: default avatarLuciano Coelho <luca@coelho.fi>
    f83e5413
tx.c 31.7 KB