wlan: DTIM3 changed to DTIM1 after roaming

High level summary of the issue is DTIM3 getting changed to DTIM1
after roaming.
Root cause:
1. gEnabledModulatedDTIM=3 is configured and after the initial
association and wlan enters early suspend (When LCD goes OFF),
DTIM period (Modulated/Dynamic DTIM) is sent down to FW as a part
of SET_POWER_PARAMS_REQ and this triggers Exit/Enter BMPS.
2. During ENTER_BMPS_REQ in FW, Listen Interval (LI) is computed
based on Modulated DTIM (Which is 3 here), LI = LI * ModDTIM
Hence LI becomes 3 (DTIM3).
Modulated DTIM is stored per BSS (bssIdx = 0 in this case)
3. When roaming is triggered, as a part of this DELETE_BSS_REQ
in FW zeroes out Modulated DTIM to 0 (bssIdx = 0)
4. After successful roaming, next Enter BMPS_REQ does not consider
Modulated DTIM as this is 0 and LI remains 1 (DTIM1)
Because the LCD is already OFF (wlan suspended), this does not
trigger SET_POWER_PARAMS_REQ to change DTIM to 3.

Fix:
The fix is to identify, if the wlan is already in early suspend
during reassociation; if so then send down SET_POWER_PARAMS_REQ to
FW before the next ENTER_BMPS_REQ so that LI is recomputed and it
regains to DTIM3.

SET_POWER_PARAMS_REQ is sent after the SET_KEY_COMPLETE and before
ENTER_BMPS_REQ

Change-Id: I53f69ec4be7f25083a71db48ed16f1668ab1ceb5
CRs-Fixed: 513043
3 files changed
tree: ddcfaf1866cb852aefc344ee9310a9abd804bd01
  1. CORE/
  2. firmware_bin/
  3. riva/
  4. Android.mk
  5. Kbuild
  6. Kconfig