Explorar o código

qcacmn: Add WDI event for offload tx data for packet capture mode

Add WDI event and call wdi event handler to deliver offload tx
packets to packet capture mode.

Change-Id: I064ffaaebd13bcf2060d91c58a07b93ec741b133
CRs-Fixed: 2844731
Vulupala Shashank Reddy %!s(int64=4) %!d(string=hai) anos
pai
achega
86566328a2
Modificáronse 2 ficheiros con 35 adicións e 0 borrados
  1. 1 0
      dp/inc/cdp_txrx_stats_struct.h
  2. 34 0
      dp/wifi3.0/dp_htt.c

+ 1 - 0
dp/inc/cdp_txrx_stats_struct.h

@@ -365,6 +365,7 @@ enum WDI_EVENT {
 	WDI_EVENT_PEER_QOS_STATS,
 	WDI_EVENT_PKT_CAPTURE_TX_DATA,
 	WDI_EVENT_PKT_CAPTURE_RX_DATA,
+	WDI_EVENT_PKT_CAPTURE_OFFLOAD_TX_DATA,
 	/* End of new event items */
 	WDI_EVENT_LAST
 };

+ 34 - 0
dp/wifi3.0/dp_htt.c

@@ -4448,6 +4448,34 @@ static void dp_htt_bkp_event_alert(u_int32_t *msg_word, struct htt_soc *soc)
 	dp_print_napi_stats(pdev->soc);
 }
 
+#ifdef WLAN_FEATURE_PKT_CAPTURE_LITHIUM
+/*
+ * dp_offload_ind_handler() - offload msg handler
+ * @htt_soc: HTT SOC handle
+ * @msg_word: Pointer to payload
+ *
+ * Return: None
+ */
+static void
+dp_offload_ind_handler(struct htt_soc *soc, uint32_t *msg_word)
+{
+	u_int8_t pdev_id;
+	u_int8_t target_pdev_id;
+
+	target_pdev_id = HTT_T2H_PPDU_STATS_PDEV_ID_GET(*msg_word);
+	pdev_id = dp_get_host_pdev_id_for_target_pdev_id(soc->dp_soc,
+							 target_pdev_id);
+	dp_wdi_event_handler(WDI_EVENT_PKT_CAPTURE_OFFLOAD_TX_DATA, soc->dp_soc,
+			     msg_word, HTT_INVALID_PEER, WDI_NO_VAL,
+			     pdev_id);
+}
+#else
+static void
+dp_offload_ind_handler(struct htt_soc *soc, uint32_t *msg_word)
+{
+}
+#endif
+
 /*
  * dp_htt_t2h_msg_handler() - Generic Target to host Msg/event handler
  * @context:	Opaque context (HTT SOC handle)
@@ -4795,6 +4823,12 @@ static void dp_htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
 
 			dp_rx_fst_update_cmem_params(soc->dp_soc, num_entries,
 						     cmem_ba_lo, cmem_ba_hi);
+			break;
+		}
+	case HTT_T2H_MSG_TYPE_TX_OFFLOAD_DELIVER_IND:
+		{
+			dp_offload_ind_handler(soc, msg_word);
+			break;
 		}
 	default:
 		break;