• Arik Nemtsov's avatar
    wl12xx: reset link Tx queues when freeing it · 6246ca00
    Arik Nemtsov authored
    Before, the link was first freed (invalidating it in the map), and later
    on vif removal, all valid wlvif-related links were reset. Since these
    links were already invalid, we failed to reset them.
    The bug was made worse by op_stop, which set the tx_queue_count to 0
    arbitrarily. This resulted in a negative tx_queue_count in some scenarios.
    
    Fix this by resetting the Tx-queues of a link when freeing it. Add a
    WARN_ON and reset all link Tx-queues in op_stop, to avoid a negative
    tx_queue_count.
    
    [changed WARN_ON to WARN_ON_ONCE -- Luca]
    Signed-off-by: default avatarArik Nemtsov <arik@wizery.com>
    Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
    6246ca00
main.c 140 KB