wlan: Reprogram Hardware filters

In one case if WCN chip come out of IMPS and host is still
not suspened; Reprogramming of Hardware filter is needed.
Host resumes comes when Riva is in IMPS. The RXP setting
made by host resume are lost when Riva exits IMPS.
In this case; host should do exit IMPS and then host should
send resume.

Change-Id: I24db291221392de26a60160e34151bd31b094e59
CRs-Fixed: 594494
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index 5850570..fa98388 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -1281,6 +1281,23 @@
          hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Not able to set mcast/bcast filter ", __func__);
    }
    else
+   {
+      /* Android framework can send resume request when the WCN chip is
+       * in IMPS mode. When the chip exits IMPS mode the firmware will
+       * restore all the registers to the state they were before the chip
+       * entered IMPS and so our hardware filter settings confgured by the
+       * resume request will be lost. So reconfigure the filters on detecting
+       * a change in the power state of the WCN chip.
+       */
+      if (IMPS != newState)
+      {
+           if (FALSE == pHddCtx->hdd_wlan_suspended)
+           {
+                hddLog(VOS_TRACE_LEVEL_INFO,
+                          "Not in IMPS/BMPS and suspended state");
+                hdd_conf_mcastbcast_filter(pHddCtx, FALSE);
+           }
+      }
       spin_unlock(&pHddCtx->filter_lock);
 }