wlan: fix race during device suspend

While suspending the device, driver notifies
its threads about the system's intentions and
waits for the threads to process its pending
tasks and acknowledge the suspend event. If
a thread does not acknowledge the event
then the driver's suspend routine returns
failure. But there is a race condition
where the driver's suspend routine times
out just before the thread can acknowledge
the driver and so the thread suspends but the
driver returns failure to the kernel and since
the kernel will not call the resume event
again for a failed suspend, the Thread will
remain suspended forever.

Fix the race condition by using the APIs
which will test for the event mask and set
it atomically.

Change-Id: I81ebbceb7623f6dd09d00c6a79a4913a19dc6e89
CRs-Fixed: 673980
2 files changed
tree: 97196fe024c0778b18cc618674b1bc7b7bd88c74
  1. CORE/
  2. firmware_bin/
  3. riva/
  4. Android.mk
  5. Kbuild
  6. Kconfig