wlan: Acquire lock before setting cancel ROC in progress flag.

When HDD receive a request to cancel ROC from supplicant, it check
if already cancel ROC in progress flag is set, and if not it sets
the cancel ROC in progress flag and calls resume link.
This is done while holding the ROC mutex.

ROC timeout also check and set cancel ROC in progress flag and
call resume link, but does it without holding the lock.

Thus a situation may arise when both will proceed to call resume
link. In this case gLimResumeLink callback is not set to NULL.
Thus next time when ROC is called the finish scan request is not
sent to firmware assuming finish scan is already sent as
gLimResumeLink callback is not NULL.
This leads to back to back init scan request to firmware which
cause crash.

Protect the cancel ROC in progress flag with mutex.

CRs-Fixed: 882047
Change-Id: Ida6cce3cef1a500bfb89dd19c4a19707575f3dac
1 file changed
tree: cbbaffda25d11fe5d5917ff6696762b490af4f24
  1. CORE/
  2. firmware_bin/
  3. riva/
  4. Android.mk
  5. Kbuild
  6. Kconfig
  7. Makefile