wlan: Rate limit certain error logs.

During IMPS failure kmsg gets flooded
with same error logs. This results in
useful logs being overwritten. As a part
of fix, rate limit those error logs.

Change-Id: Ic0d2cf124ae754a366f408e1a73d8bfcb20cea63
CRs-Fixed: 831530
diff --git a/CORE/WDI/CP/src/wlan_qct_wdi.c b/CORE/WDI/CP/src/wlan_qct_wdi.c
index da65654..484bde7 100644
--- a/CORE/WDI/CP/src/wlan_qct_wdi.c
+++ b/CORE/WDI/CP/src/wlan_qct_wdi.c
@@ -6835,6 +6835,7 @@
   WDI_Status         wdiStatus;
   WDI_MainFuncType   pfnWDIMainEvHdlr;
   WDI_MainStateType  wdiOldState;
+  static int failCnt = 0;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
@@ -6883,9 +6884,11 @@
   }
   else
   {
-    WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
+    if (!(failCnt & 0xF))
+        WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "Unexpected event %d in state: %d",
               wdiEV, wdiOldState);
+    failCnt++;
     wdiStatus = WDI_STATUS_E_NOT_ALLOWED;
   }