Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5f6722ee authored by Grazvydas Ignotas's avatar Grazvydas Ignotas Committed by John W. Linville
Browse files

wl1251: fix elp_work race condition



While working on PS I've noticed elp_work is kicking rather often, and
sometimes the chip is put to sleep before 5ms delay expires. This
seems to happen because by the time wl1251_ps_elp_wakeup is called
elp_work might still be pending. After wakeup is done, the processing
may take some time, during which 5ms might expire and elp_work might
get scheduled. In this case, ss soon as 1st thread finishes work and
releases the mutex, elp_work will then put the device to sleep without
5ms delay. In addition 1st thread will queue additional elp_work
needlessly.

Fix this by cancelling work in wl1251_ps_elp_wakeup instead.

Signed-off-by: default avatarGrazvydas Ignotas <notasas@gmail.com>
Acked-by: default avatarKalle Valo <kvalo@adurom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d0c331af
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment