wlan: Added logs in WDI and DXE to enable debugging

Added logs with to know the state of DXE when changing its power state

Change-Id: I2ff5af98888c85486426affb3c6fe00ccfe6219a
CR-Fixed: 430317
(cherry picked from commit 85acf6b87c7c1611d3e8eb0b7a792525f517ac83)
diff --git a/CORE/WDI/CP/src/wlan_qct_wdi.c b/CORE/WDI/CP/src/wlan_qct_wdi.c
index 3296834..73efcf5 100644
--- a/CORE/WDI/CP/src/wlan_qct_wdi.c
+++ b/CORE/WDI/CP/src/wlan_qct_wdi.c
@@ -6508,7 +6508,14 @@
         return VOS_STATUS_E_FAILURE;
      }
      /* Stop Transport Driver, DXE */
-     WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_DOWN, WDI_SetPowerStateCb);
+     status = WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_DOWN, WDI_SetPowerStateCb);
+     if( eWLAN_PAL_STATUS_SUCCESS != status ) 
+     {
+        WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
+                "WDTS_SetPowerState returned with status %d when trying to notify DTS that host is entering Power Down state\n", status);
+        WDI_ASSERT(0);
+        return WDI_STATUS_E_FAILURE;
+     }
      /*
       * Wait for the event to be set once the ACK comes back from DXE
       */
@@ -6998,7 +7005,7 @@
   wpt_uint16                    usDataOffset         = 0;
   wpt_uint16                    usSendSize           = 0;
   wpt_uint8                     i                    = 0;
-
+  wpt_status                    wptStatus;
   tHalFinishScanReqMsg          halFinishScanReqMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
@@ -7034,7 +7041,7 @@
                pWDICtx->bScanInProgress );
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED;
+    return WDI_STATUS_E_NOT_ALLOWED; 
   }
 
   /*-----------------------------------------------------------------------
@@ -7049,7 +7056,13 @@
   if ( pWDICtx->bInBmps )
   {
      // notify DTS that we are entering BMPS
-     WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_BMPS, NULL);
+     wptStatus = WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_BMPS, NULL);
+     if( eWLAN_PAL_STATUS_SUCCESS != wptStatus ) 
+     {
+        WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
+                "WDTS_SetPowerState returned with status %d when trying to notify DTS that host is entering BMPS\n", wptStatus);
+        WDI_ASSERT(0);
+     }
   }
 
   /*-----------------------------------------------------------------------
@@ -11754,7 +11767,13 @@
    }
 
    // notify DTS that we are entering IMPS
-   WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_IMPS, WDI_SetPowerStateCb);
+   wptStatus = WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_IMPS, WDI_SetPowerStateCb);
+   if( eWLAN_PAL_STATUS_SUCCESS != wptStatus ) {
+        WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
+                "WDTS_SetPowerState returned with status %d when trying to notify DTS that host is entering IMPS\n", wptStatus);
+        WDI_ASSERT(0);
+        return WDI_STATUS_E_FAILURE;
+    }
 
    /*
     * Wait for the event to be set once the ACK comes back from DXE
@@ -11903,7 +11922,14 @@
    }
 
    // notify DTS that we are entering BMPS
-   WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_BMPS, WDI_SetPowerStateCb);
+   wptStatus = WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_BMPS, WDI_SetPowerStateCb);
+   if( eWLAN_PAL_STATUS_SUCCESS != wptStatus ) 
+   {
+        WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
+                "WDTS_SetPowerState returned with status %d when trying to notify DTS that we are entering BMPS\n", wptStatus);
+        WDI_ASSERT(0);
+        return WDI_STATUS_E_FAILURE;
+    }
 
 /*
     * Wait for the event to be set once the ACK comes back from DXE
@@ -11916,7 +11942,7 @@
                 "WDI Init failed to wait on an event");
 
       WDI_ASSERT(0);
-      return VOS_STATUS_E_FAILURE;
+      return VOS_STATUS_E_FAILURE; 
    }
 
    pWDICtx->bInBmps = eWLAN_PAL_TRUE;
@@ -13916,6 +13942,7 @@
   WDI_Status            wdiStatus;
   WDI_InitScanRspCb     wdiInitScanRspCb;
   tHalInitScanRspMsg    halInitScanRspMsg;
+  wpt_status            wptStatus;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
@@ -13952,7 +13979,12 @@
   if ( pWDICtx->bInBmps )
   {
      // notify DTS that we are entering Full power
-     WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_FULL, NULL);
+     wptStatus = WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_FULL, NULL);
+     if( eWLAN_PAL_STATUS_SUCCESS != wptStatus ) {
+        WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
+                "WDTS_SetPowerState returned with status %d when trying to notify DTS that host is entering Full Power state\n", wptStatus);
+        WDI_ASSERT(0);
+    }
   }
 
   /*Notify UMAC*/
@@ -16783,6 +16815,7 @@
   WDI_Status           wdiStatus;
   eHalStatus           halStatus;
   WDI_EnterImpsRspCb   wdiEnterImpsRspCb;
+  wpt_status wptStatus;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
@@ -16817,7 +16850,13 @@
                 halStatus);
      /* Call Back is not required as we are putting the DXE in FULL
       * and riva is already in full (IMPS RSP Failed)*/
-     WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_FULL, NULL);
+     wptStatus = WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_FULL, NULL);
+     
+     if( eWLAN_PAL_STATUS_SUCCESS != wptStatus ) {
+          WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
+                "WDTS_SetPowerState returned with status %d when trying to notify DTS that host is entering Full Power state\n", wptStatus);
+          WDI_ASSERT(0);
+     }
   }
   /*Notify UMAC*/
   wdiEnterImpsRspCb( wdiStatus, pWDICtx->pRspCBUserData);
@@ -16845,6 +16884,7 @@
   WDI_Status           wdiStatus;
   eHalStatus           halStatus;
   WDI_ExitImpsRspCb    wdiExitImpsRspCb;
+  wpt_status           wptStatus;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
@@ -16868,8 +16908,13 @@
   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   // notify DTS that we are entering Full power
-  WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_FULL, NULL);
-
+  wptStatus = WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_FULL, NULL);
+  if( eWLAN_PAL_STATUS_SUCCESS != wptStatus ) 
+  {
+    WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
+                "WDTS_SetPowerState returned with status %d when trying to notify DTS that host is entering Full Power state\n", wptStatus);
+    WDI_ASSERT(0);
+  }
   /*Notify UMAC*/
   wdiExitImpsRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
@@ -16897,7 +16942,7 @@
   tHalEnterBmpsRspParams halEnterBmpsRsp;
   WDI_EnterBmpsRspCb     wdiEnterBmpsRspCb;
   WDI_EnterBmpsRspParamsType wdiEnterBmpsRspparams;
-  
+  wpt_status             wptStatus;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
@@ -16946,7 +16991,13 @@
                   halStatus); 
        /* Call Back is not required as we are putting the DXE in FULL
         * and riva is already in FULL (BMPS RSP Failed)*/
-       WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_FULL, NULL);
+       wptStatus = WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_FULL, NULL);
+       if( eWLAN_PAL_STATUS_SUCCESS != wptStatus ) 
+       {
+           WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
+                "WDTS_SetPowerState returned with status %d when trying to notify DTS that host is entering Full Power state\n", wptStatus);
+           WDI_ASSERT(0);
+       }
        pWDICtx->bInBmps = eWLAN_PAL_FALSE;
    }
   
@@ -16976,7 +17027,8 @@
   eHalStatus           halStatus;
   WDI_ExitBmpsRspCb   wdiExitBmpsRspCb;
   tHalExitBmpsRspParams halExitBmpsRsp;
-  WDI_ExitBmpsRspParamsType wdiExitBmpsRspParams; 
+  WDI_ExitBmpsRspParamsType wdiExitBmpsRspParams;
+  wpt_status                wptStatus;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
@@ -17013,8 +17065,13 @@
   }
 
   // notify DTS that we are entering Full power
-  WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_FULL, NULL);
-
+  wptStatus = WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_FULL, NULL);
+  if( eWLAN_PAL_STATUS_SUCCESS != wptStatus ) 
+  {
+    WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
+                "WDTS_SetPowerState returned with status %d when trying to notify DTS that host is entering Full Power state\n", wptStatus);
+    WDI_ASSERT(0);
+  }
   pWDICtx->bInBmps = eWLAN_PAL_FALSE;
 
   /*Notify UMAC*/