Browse Source

qcacld-3.0: Enable Packetlog for Napier

Add ATH_PKTLOG_LITE_T2H and ATH_PKTLOG_LITE_RX
support for Napier.

Change-Id: I6e2833e2f7e1a4c68c51f7ae83d0ae76f63c9b0f
CRs-Fixed: 2133558
Venkata Sharath Chandra Manchala 7 years ago
parent
commit
1240fc7c98

+ 4 - 0
Kbuild

@@ -1123,6 +1123,10 @@ ifeq ($(CONFIG_IPA_OFFLOAD), 1)
 DP_OBJS +=     $(DP_SRC)/dp_ipa.o
 endif
 
+ifeq ($(CONFIG_WDI_EVENT_ENABLE), 1)
+DP_OBJS +=     $(DP_SRC)/dp_wdi_event.o
+endif
+
 ############ CFG ############
 WCFG_DIR := wlan_cfg
 WCFG_INC := -I$(WLAN_COMMON_INC)/$(WCFG_DIR)

+ 1 - 1
core/dp/txrx/ol_txrx.c

@@ -1292,7 +1292,7 @@ void htt_pkt_log_init(struct cdp_pdev *ppdev, void *scn)
 
 	if (cds_get_conparam() != QDF_GLOBAL_FTM_MODE &&
 			!QDF_IS_EPPING_ENABLED(cds_get_conparam())) {
-		ol_pl_sethandle(&handle->pl_dev, scn);
+		pktlog_sethandle(&handle->pl_dev, scn);
 		if (pktlogmod_init(scn))
 			qdf_print("%s: pktlogmod_init failed", __func__);
 		else

+ 1 - 1
core/dp/txrx/ol_txrx_event.c

@@ -70,7 +70,7 @@ wdi_event_iter_sub(struct ol_txrx_pdev_t *pdev,
 
 	if (wdi_sub) {
 		do {
-			wdi_sub->callback(pdev, event, data);
+			wdi_sub->callback(pdev, event, data, 0, 0);
 		} while ((wdi_sub = wdi_event_next_sub(wdi_sub)));
 	}
 }

+ 1 - 1
core/dp/txrx/ol_txrx_types.h

@@ -620,7 +620,7 @@ struct ol_txrx_pdev_t {
 #if !defined(REMOVE_PKT_LOG) && !defined(QVIT)
 	bool pkt_log_init;
 	/* Pktlog pdev */
-	struct ol_pktlog_dev_t *pl_dev;
+	struct pktlog_dev_t *pl_dev;
 #endif /* #ifndef REMOVE_PKT_LOG */
 
 	enum ol_sec_type sec_types[htt_num_sec_types];

+ 6 - 1
core/dp/txrx/wdi_event.h

@@ -32,6 +32,7 @@
 #include "qdf_nbuf.h"
 #define WDI_EVENT_BASE 0x100    /* Event starting number */
 
+#define WDI_NO_VAL (-1)
 enum WDI_EVENT {
 	WDI_EVENT_TX_STATUS = WDI_EVENT_BASE,
 	WDI_EVENT_RX_DESC,
@@ -40,6 +41,9 @@ enum WDI_EVENT {
 	WDI_EVENT_RATE_UPDATE,
 	WDI_EVENT_SW_EVENT,
 	WDI_EVENT_RX_PEER_INVALID,
+	/* From WIN definations */
+	WDI_EVENT_LITE_RX,
+	WDI_EVENT_LITE_T2H,
 	/* End of new event items */
 
 	WDI_EVENT_LAST
@@ -62,7 +66,8 @@ enum WDI_EVENT_NOTIFY {
 };
 
 /* Opaque event callback */
-typedef void (*wdi_event_cb)(void *pdev, enum WDI_EVENT event, void *data);
+typedef void (*wdi_event_cb)(void *pdev, enum WDI_EVENT event, void *data,
+					u_int16_t peer_id, uint32_t status);
 
 /* Opaque event notify */
 typedef void (*wdi_event_notify)(enum WDI_EVENT_NOTIFY notify,

+ 7 - 1
core/wma/src/wma_main.c

@@ -6547,6 +6547,7 @@ static void wma_set_wifi_start_packet_stats(void *wma_handle,
 					struct sir_wifi_start_log *start_log)
 {
 }
+
 #else
 static void wma_set_wifi_start_packet_stats(void *wma_handle,
 					struct sir_wifi_start_log *start_log)
@@ -6576,9 +6577,14 @@ static void wma_set_wifi_start_packet_stats(void *wma_handle,
 		return;
 	}
 
+#ifdef HELIUMPLUS
 	log_state = ATH_PKTLOG_ANI | ATH_PKTLOG_RCUPDATE | ATH_PKTLOG_RCFIND |
 		ATH_PKTLOG_RX | ATH_PKTLOG_TX |
-		ATH_PKTLOG_TEXT | ATH_PKTLOG_SW_EVENT;
+		ATH_PKTLOG_TEXT | ATH_PKTLOG_SW_EVENT |
+		ATH_PKTLOG_LITE_T2H | ATH_PKTLOG_LITE_RX;
+#else
+	log_state = ATH_PKTLOG_LITE_T2H | ATH_PKTLOG_LITE_RX;
+#endif
 
 	if (start_log->size != 0) {
 		pktlog_setsize(scn, start_log->size * MEGABYTE);

+ 11 - 3
uapi/linux/pktlog_ac_fmt.h

@@ -69,9 +69,7 @@ struct ath_pktlog_hdr {
 #endif
 	uint16_t size;
 	uint32_t timestamp;
-#ifdef HELIUMPLUS
 	uint32_t type_specific_data;
-#endif
 } __ATTRIB_PACK;
 
 /**
@@ -149,6 +147,13 @@ enum {
 #define ATH_PKTLOG_PROMISC  0x000000080
 #define ATH_PKTLOG_SW_EVENT 0x000000100
 
+/* WIN defns */
+#define ATH_PKTLOG_H_INFO   0x000000200
+#define ATH_PKTLOG_STEERING 0x000000400
+#define ATH_PKTLOG_REMOTE_LOGGING_ENABLE  0x000000800
+#define ATH_PKTLOG_TX_CAPTURE_ENABLE  0x000001000
+#define ATH_PKTLOG_LITE_T2H  0x000002000
+#define ATH_PKTLOG_LITE_RX   0x000004000
 
 /* Types of packet log events */
 #define PKTLOG_TYPE_TX_CTRL      1
@@ -162,7 +167,10 @@ enum {
 #define PKTLOG_TYPE_SMART_ANTENNA 9
 #define PKTLOG_TYPE_SW_EVENT     10
 #define PKTLOG_TYPE_PKT_DUMP     11
-#define PKTLOG_TYPE_MAX          12
+/* From WIN definations */
+#define PKTLOG_TYPE_LITE_T2H     23
+#define PKTLOG_TYPE_LITE_RX      24
+#define PKTLOG_TYPE_MAX          25
 
 #define PKTLOG_MAX_TXCTL_WORDS 57       /* +2 words for bitmap */
 #define PKTLOG_MAX_TXSTATUS_WORDS 32