OSDN Git Service

wlcore: fixes for connection_loss_work
authorArik Nemtsov <arik@wizery.com>
Tue, 15 May 2012 14:08:54 +0000 (17:08 +0300)
committerLuciano Coelho <coelho@ti.com>
Tue, 5 Jun 2012 14:16:08 +0000 (17:16 +0300)
commit6b8bf5bc5e99f52334bec1b06b14d28dc595c95a
treedce70af33853e584eed256952b7dbbcc55098eef
parent6e066921b3970232d5faadcdf33a92f43ec84334
wlcore: fixes for connection_loss_work

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: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/ti/wlcore/event.c
drivers/net/wireless/ti/wlcore/main.c