wlan: trim the meta-information from logging packets

The 4 byte meta-information attached by firmware to
the logging packets is used to classify them into different
log types so that they can be displayed correctly. But the
logging applications do not expect the meta-information as
part of the payload, so we have to trim it out before passing
it to the user-space.

Change-Id: Iafa10c5dd3b027e83aa9cb6ac7f091400fc6bf82
CRs-Fixed: 823982
diff --git a/CORE/SVC/inc/wlan_logging_sock_svc.h b/CORE/SVC/inc/wlan_logging_sock_svc.h
index c171441..55a7073 100644
--- a/CORE/SVC/inc/wlan_logging_sock_svc.h
+++ b/CORE/SVC/inc/wlan_logging_sock_svc.h
@@ -45,6 +45,6 @@
 int wlan_logging_flush_pkt_queue(void);
 int wlan_logging_sock_deactivate_svc(void);
 int wlan_log_to_user(VOS_TRACE_LEVEL log_level, char *to_be_sent, int length);
-int wlan_queue_logpkt_for_app(vos_pkt_t *pPacket, uint8 pkt_type);
+int wlan_queue_logpkt_for_app(vos_pkt_t *pPacket, uint32 pkt_type);
 
 #endif /* WLAN_LOGGING_SOCK_SVC_H */
diff --git a/CORE/SVC/src/logging/wlan_logging_sock_svc.c b/CORE/SVC/src/logging/wlan_logging_sock_svc.c
index 49ef0c3..c7b7d20 100755
--- a/CORE/SVC/src/logging/wlan_logging_sock_svc.c
+++ b/CORE/SVC/src/logging/wlan_logging_sock_svc.c
@@ -836,7 +836,7 @@
        return 0;
 }
 
-int wlan_queue_logpkt_for_app(vos_pkt_t *pPacket, uint8 pkt_type)
+int wlan_queue_logpkt_for_app(vos_pkt_t *pPacket, uint32 pkt_type)
 {
 	unsigned long flags;
 	vos_pkt_t *next_pkt;
diff --git a/CORE/VOSS/inc/vos_api.h b/CORE/VOSS/inc/vos_api.h
index 3047ab1..22786ca 100644
--- a/CORE/VOSS/inc/vos_api.h
+++ b/CORE/VOSS/inc/vos_api.h
@@ -175,7 +175,7 @@
 
 v_U8_t vos_is_reinit_in_progress(VOS_MODULE_ID moduleId, v_VOID_t *moduleContext);
 void vos_set_reinit_in_progress(VOS_MODULE_ID moduleId, v_U8_t value);
-VOS_STATUS vos_logger_pkt_serialize(vos_pkt_t *pPacket, uint8 pkt_type);
+VOS_STATUS vos_logger_pkt_serialize(vos_pkt_t *pPacket, uint32 pkt_type);
 
 /**---------------------------------------------------------------------------
   
diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c
index e7517e9..3fd4c9f 100644
--- a/CORE/VOSS/src/vos_api.c
+++ b/CORE/VOSS/src/vos_api.c
@@ -1476,7 +1476,7 @@
           VOS_STATUS_E_FAILURE - the pkt queue handler has reported
           a failure.
   --------------------------------------------------------------------------*/
-VOS_STATUS vos_logger_pkt_serialize( vos_pkt_t *pPacket, uint8 pkt_type)
+VOS_STATUS vos_logger_pkt_serialize( vos_pkt_t *pPacket, uint32 pkt_type)
 {
 #ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
       return wlan_queue_logpkt_for_app(pPacket, pkt_type);
diff --git a/CORE/WDI/DP/inc/wlan_qct_wdi_ds.h b/CORE/WDI/DP/inc/wlan_qct_wdi_ds.h
index 92dfa70..6751363 100644
--- a/CORE/WDI/DP/inc/wlan_qct_wdi_ds.h
+++ b/CORE/WDI/DP/inc/wlan_qct_wdi_ds.h
@@ -87,7 +87,7 @@
   WDI_DS_OPCODE_MAX
 }WDI_DS_BAOpCodeEnumType;
 
-#define WDI_DS_LOG_PKT_TYPE_LEN 1
+#define WDI_DS_LOG_PKT_TYPE_LEN 4
 typedef enum
 {
   WDI_DS_PACKET_LOG = 1<<0,
@@ -98,7 +98,7 @@
   // make sure to change the data type of
   // WDI_DS_RxMetaInfoType.loggingData from wpt_uint8
   // to accommodate more values
-  WDI_DS_MAX_LOG    = 1<<7
+  WDI_DS_MAX_LOG    = 1<<31
 }WDI_DS_LoggingDataEnumType;
 
 typedef struct 
@@ -172,7 +172,7 @@
 #ifdef WLAN_FEATURE_EXTSCAN
    wpt_uint32 extscanBuffer;
 #endif
-   wpt_uint8 loggingData;
+   wpt_uint32 loggingData;
 } WDI_DS_RxMetaInfoType;
 
 typedef struct sPktMetaInfo
diff --git a/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c b/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c
index ea6a95f..43c4769 100644
--- a/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c
+++ b/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c
@@ -1003,7 +1003,10 @@
    {
       // a VALID packet implies non NULL meta-data
       pRxMetadata = WDI_DS_ExtractRxMetaData(pFrame);
-      pRxMetadata->loggingData = *((wpt_uint8 *)pBuffer);
+      pRxMetadata->loggingData = *((wpt_uint32 *)pBuffer);
+
+      wpalPacketRawTrimHead(pFrame, WDI_DS_LOG_PKT_TYPE_LEN);
+
       vos_logger_pkt_serialize(WPAL_TO_VOS_PKT(pFrame), pRxMetadata->loggingData);
    }
    else