wlan: Do not let APPS to suspend if LFR is in the middle of a scan.

When AP to which the STA is connected is abruptly turned off, LFR
triggered scans kick-in due to RSSI penalization of missed beacons.
When this happens, it is being observed that it takes a very long
time to disconnect and move into IMPS.

This happens when APPS attempts to suspend when LFR is in the middle
of a background scan (i.e. the suspend request came in between the
INIT and FINISH scan for the single/multiple channel background scan
triggered by LFR).

Background scans from LFR do not use a wakelock (as this is a non-HLOS
functionality). Due to this, the suspend request from the APPS succeeds.
When this happens, Riva is still in suspend BMPS state because we are
in the middle of a background scan. Riva resumes BMPS only when the
scan completes. But, since the APPS is already suspended, finishing the
scan gets delayed and there is nothing to have Riva resume BMPS.

When BMPS is suspended in Riva during the scan, the heartbeat/beacon
miss monitoring is suspended as well. So, if APPS suspends when LFR is
in the middle of a background scan, then beacon miss monitoring in Riva
gets disabled as well. This in turn results in long time to get
disconnected and enter IMPS.

This issue is being fixed by not allowing APPS to suspend when LFR is
in the middle of a background scan.

Change-Id: Ia68fd710fb61903d7691a32bc30cfbf1839a2d06
CRs-Fixed: 444003
3 files changed
tree: 7e8be1aa0b33f05513e26e9ea54d7d9e49476638
  1. CORE/
  2. firmware_bin/
  3. riva/
  4. Android.mk
  5. Kbuild
  6. Kconfig