prima: Support to query the FW logs
vos_process_done_indication() is called when FW sets the done variable in
the logging mailbox with type(mgmt logging/QXDM/FW memory dump). This VOSS
API needs to be called after the DXE H2H transaction is completed.
Change-Id: Icf5b0fe3f92056ff76b0debcc456d22a2c8a5688
CRs-Fixed: 882168
diff --git a/CORE/WDI/CP/inc/wlan_qct_wdi.h b/CORE/WDI/CP/inc/wlan_qct_wdi.h
index 426013f..bab070c 100644
--- a/CORE/WDI/CP/inc/wlan_qct_wdi.h
+++ b/CORE/WDI/CP/inc/wlan_qct_wdi.h
@@ -153,6 +153,7 @@
#define MAXNUM_PERIODIC_TX_PTRNS 6
#define WDI_DISA_MAX_PAYLOAD_SIZE 1600
#define MAX_NUM_OF_BUFFER 3
+#define VALID_FW_LOG_TYPES 2
/*============================================================================
* GENERIC STRUCTURES
diff --git a/CORE/WDI/DP/inc/wlan_qct_wdi_ds.h b/CORE/WDI/DP/inc/wlan_qct_wdi_ds.h
index 2cc9f56..fea8be8 100644
--- a/CORE/WDI/DP/inc/wlan_qct_wdi_ds.h
+++ b/CORE/WDI/DP/inc/wlan_qct_wdi_ds.h
@@ -189,6 +189,10 @@
wpt_boolean active;
wpt_uint64 logBuffAddress[MAX_NUM_OF_BUFFER];
wpt_uint32 logBuffLength[MAX_NUM_OF_BUFFER];
+ /* Log type i.e. Mgmt frame = 0, QXDM = 1, FW Mem dump = 2 */
+ wpt_uint8 logType;
+ /* Indicate if Last segment of log is received*/
+ wpt_boolean done;
} WDI_DS_LoggingSessionType;
WPT_STATIC WPT_INLINE WDI_DS_RxMetaInfoType* WDI_DS_ExtractRxMetaData (wpt_packet *pFrame)
diff --git a/CORE/WDI/TRP/DTS/src/wlan_qct_wdi_dts.c b/CORE/WDI/TRP/DTS/src/wlan_qct_wdi_dts.c
index d85986d..1ee86f5 100644
--- a/CORE/WDI/TRP/DTS/src/wlan_qct_wdi_dts.c
+++ b/CORE/WDI/TRP/DTS/src/wlan_qct_wdi_dts.c
@@ -47,6 +47,7 @@
#include "wlan_qct_wdi_dp.h"
#include "wlan_qct_wdi_sta.h"
#include "vos_utils.h"
+#include "vos_api.h"
static WDTS_TransportDriverTrype gTransportDriver = {
WLANDXE_Open,
@@ -879,6 +880,8 @@
}
}
+ pLoggingSession->done = pLoggingMb->done;
+ pLoggingSession->logType = pLoggingMb->logType;
// Done using Mailbox, zero out the memory.
wpalMemoryZero(pLoggingMb, sizeof(tLoggingMailBox));
@@ -893,11 +896,21 @@
void WDTS_LogRxDone(void *pContext)
{
- if (NULL == pContext)
+ WDI_DS_LoggingSessionType *pLoggingSession;
+
+ pLoggingSession = (WDI_DS_LoggingSessionType *)
+ WDI_DS_GetLoggingSession(pContext);
+
+ if (NULL == pContext || pLoggingSession == NULL)
{
return;
}
+ /* check for done and Log type Mgmt frame = 0, QXDM = 1, FW Mem dump = 2 */
+ if (pLoggingSession->done && pLoggingSession->logType <= VALID_FW_LOG_TYPES)
+ vos_process_done_indication(pLoggingSession->logType, 0);
+ pLoggingSession->done = 0;
+ pLoggingSession->logType = 0;
((WDI_DS_ClientDataType *)(pContext))->rxLogCB();
return;