• Arik Nemtsov's avatar
    wlcore: fixes for connection_loss_work · 6b8bf5bc
    Arik Nemtsov authored
    We can't use cancel_delayed_work_sync() from functions that take the
    wl->mutex, since connection_loss_work also takes the mutex. This might
    result in a deadlock. Restructure the code so the work is synchronously
    canceled before taking the mutex.
    Avoid a bug where we would indefinitely delay the connection loss
    indication by re-queuing the connection loss work on consecutive beacon
    loss events.
    
    Cc: bartosz.markowski <bartosz.markowski@tieto.com>
    Signed-off-by: default avatarArik Nemtsov <arik@wizery.com>
    Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
    6b8bf5bc
main.c 133 KB