Переглянути джерело

qcacmn: Add new HTT msg support for BE

- Add support htt msg for HTT_H2T_MSG_TYPE_TX_RING_SELECTION_CFG
  msg configuration
- Add support for configurable length dma
  per packet type for rx monitor.
- Add support for wordmask subscription for rx monitor.
- Add support for per packet msdu/mpdu logging config.
- Add support for tx monitor tlv subscription.
- Dummy APIs for 2.0 filter configuration

Change-Id: I36b18c03eff452537c2f051b24275b81ab98ebae
CRs-Fixed: 2991330
Naga 3 роки тому
батько
коміт
e1a6f926ed

+ 27 - 50
dp/wifi3.0/dp_htt.c

@@ -52,20 +52,9 @@
 
 #define HTT_SHIFT_UPPER_TIMESTAMP 32
 #define HTT_MASK_UPPER_TIMESTAMP 0xFFFFFFFF00000000
-
-#define HTT_HTC_PKT_STATUS_SUCCESS \
-	((pkt->htc_pkt.Status != QDF_STATUS_E_CANCELED) && \
-	(pkt->htc_pkt.Status != QDF_STATUS_E_RESOURCES))
-
 #define HTT_BKP_STATS_MAX_QUEUE_DEPTH 16
 
-/*
- * htt_htc_pkt_alloc() - Allocate HTC packet buffer
- * @htt_soc:	HTT SOC handle
- *
- * Return: Pointer to htc packet buffer
- */
-static struct dp_htt_htc_pkt *
+struct dp_htt_htc_pkt *
 htt_htc_pkt_alloc(struct htt_soc *soc)
 {
 	struct dp_htt_htc_pkt_union *pkt = NULL;
@@ -88,11 +77,9 @@ htt_htc_pkt_alloc(struct htt_soc *soc)
 	return &pkt->u.pkt; /* not actually a dereference */
 }
 
-/*
- * htt_htc_pkt_free() - Free HTC packet buffer
- * @htt_soc:	HTT SOC handle
- */
-static void
+qdf_export_symbol(htt_htc_pkt_alloc);
+
+void
 htt_htc_pkt_free(struct htt_soc *soc, struct dp_htt_htc_pkt *pkt)
 {
 	struct dp_htt_htc_pkt_union *u_pkt =
@@ -105,6 +92,8 @@ htt_htc_pkt_free(struct htt_soc *soc, struct dp_htt_htc_pkt *pkt)
 	HTT_TX_MUTEX_RELEASE(&soc->htt_tx_mutex);
 }
 
+qdf_export_symbol(htt_htc_pkt_free);
+
 /*
  * htt_htc_pkt_pool_free() - Free HTC packet pool
  * @htt_soc:	HTT SOC handle
@@ -122,14 +111,8 @@ htt_htc_pkt_pool_free(struct htt_soc *soc)
 	soc->htt_htc_pkt_freelist = NULL;
 }
 
-#ifdef ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST
-
-static void
-htt_htc_misc_pkt_list_add(struct htt_soc *soc, struct dp_htt_htc_pkt *pkt)
-{
-}
 
-#else  /* ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST */
+#ifndef ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST
 
 /*
  * htt_htc_misc_pkt_list_trim() - trim misc list
@@ -169,7 +152,7 @@ htt_htc_misc_pkt_list_trim(struct htt_soc *soc, int level)
  * @htt_soc:	HTT SOC handle
  * @dp_htt_htc_pkt: pkt to be added to list
  */
-static void
+void
 htt_htc_misc_pkt_list_add(struct htt_soc *soc, struct dp_htt_htc_pkt *pkt)
 {
 	struct dp_htt_htc_pkt_union *u_pkt =
@@ -193,33 +176,9 @@ htt_htc_misc_pkt_list_add(struct htt_soc *soc, struct dp_htt_htc_pkt *pkt)
 	htt_htc_misc_pkt_list_trim(soc, misclist_trim_level);
 }
 
+qdf_export_symbol(htt_htc_misc_pkt_list_add);
 #endif  /* ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST */
 
-/**
- * DP_HTT_SEND_HTC_PKT() - Send htt packet from host
- * @soc : HTT SOC handle
- * @pkt: pkt to be send
- * @cmd : command to be recorded in dp htt logger
- * @buf : Pointer to buffer needs to be recored for above cmd
- *
- * Return: None
- */
-static inline QDF_STATUS DP_HTT_SEND_HTC_PKT(struct htt_soc *soc,
-					     struct dp_htt_htc_pkt *pkt,
-					     uint8_t cmd, uint8_t *buf)
-{
-	QDF_STATUS status;
-
-	htt_command_record(soc->htt_logger_handle, cmd, buf);
-
-	status = htc_send_pkt(soc->htc_soc, &pkt->htc_pkt);
-	if (status == QDF_STATUS_SUCCESS && HTT_HTC_PKT_STATUS_SUCCESS)
-		htt_htc_misc_pkt_list_add(soc, pkt);
-	else
-		soc->stats.fail_count++;
-	return status;
-}
-
 /*
  * htt_htc_misc_pkt_pool_free() - free pkts in misc list
  * @htt_soc:	HTT SOC handle
@@ -535,6 +494,17 @@ int htt_srng_setup(struct htt_soc *soc, int mac_id,
 		htt_ring_id = HTT_RXDMA_NON_MONITOR_DEST_RING;
 		htt_ring_type = HTT_HW_TO_SW_RING;
 		break;
+#if QCA_MONITOR_2_0_SUPPORT_WAR
+	// WAR till fw htt.h changes are merged
+	case TX_MONITOR_BUF:
+		htt_ring_id = HTT_TX_MON_HOST2MON_BUF_RING;
+		htt_ring_type = HTT_SW_TO_HW_RING;
+		break;
+	case TX_MONITOR_DST:
+		htt_ring_id = HTT_TX_MON_MON2HOST_DEST_RING;
+		htt_ring_type = HTT_HW_TO_SW_RING;
+		break;
+#endif
 
 	default:
 		QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
@@ -948,6 +918,8 @@ int htt_h2t_rx_ring_cfg(struct htt_soc *htt_soc, int pdev_id,
 	HTT_RX_RING_SELECTION_CFG_RING_BUFFER_SIZE_SET(*msg_word,
 		ring_buf_size);
 
+	dp_mon_rx_packet_length_set(soc->dp_soc, msg_word, htt_tlv_filter);
+
 	/* word 2 */
 	msg_word++;
 	*msg_word = 0;
@@ -1515,6 +1487,11 @@ int htt_h2t_rx_ring_cfg(struct htt_soc *htt_soc, int pdev_id,
 	if (mon_drop_th > 0)
 		HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD_SET(*msg_word,
 								mon_drop_th);
+	dp_mon_rx_enable_mpdu_logging(soc->dp_soc, msg_word, htt_tlv_filter);
+
+	msg_word++;
+	*msg_word = 0;
+	dp_mon_rx_wmask_subscribe(soc->dp_soc, msg_word, htt_tlv_filter);
 
 	/* "response_required" field should be set if a HTT response message is
 	 * required after setting up the ring.

+ 63 - 0
dp/wifi3.0/dp_htt.h

@@ -680,6 +680,69 @@ struct dp_htt_rx_fisa_cfg {
 	uint32_t fisa_timeout;
 };
 
+/*
+ * htt_htc_pkt_alloc() - Allocate HTC packet buffer
+ * @htt_soc:	HTT SOC handle
+ *
+ * Return: Pointer to htc packet buffer
+ */
+struct dp_htt_htc_pkt *htt_htc_pkt_alloc(struct htt_soc *soc);
+
+/*
+ * htt_htc_pkt_free() - Free HTC packet buffer
+ * @htt_soc:	HTT SOC handle
+ */
+void
+htt_htc_pkt_free(struct htt_soc *soc, struct dp_htt_htc_pkt *pkt);
+
+#define HTT_HTC_PKT_STATUS_SUCCESS \
+	((pkt->htc_pkt.Status != QDF_STATUS_E_CANCELED) && \
+	(pkt->htc_pkt.Status != QDF_STATUS_E_RESOURCES))
+
+#ifdef ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST
+
+static void
+htt_htc_misc_pkt_list_add(struct htt_soc *soc, struct dp_htt_htc_pkt *pkt)
+{
+}
+
+#else  /* ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST */
+
+/*
+ * htt_htc_misc_pkt_list_add() - Add pkt to misc list
+ * @htt_soc:	HTT SOC handle
+ * @dp_htt_htc_pkt: pkt to be added to list
+ */
+void
+htt_htc_misc_pkt_list_add(struct htt_soc *soc, struct dp_htt_htc_pkt *pkt);
+
+#endif  /* ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST */
+
+/**
+ * DP_HTT_SEND_HTC_PKT() - Send htt packet from host
+ * @soc : HTT SOC handle
+ * @pkt: pkt to be send
+ * @cmd : command to be recorded in dp htt logger
+ * @buf : Pointer to buffer needs to be recored for above cmd
+ *
+ * Return: None
+ */
+static inline QDF_STATUS DP_HTT_SEND_HTC_PKT(struct htt_soc *soc,
+					     struct dp_htt_htc_pkt *pkt,
+					     uint8_t cmd, uint8_t *buf)
+{
+	QDF_STATUS status;
+
+	htt_command_record(soc->htt_logger_handle, cmd, buf);
+
+	status = htc_send_pkt(soc->htc_soc, &pkt->htc_pkt);
+	if (status == QDF_STATUS_SUCCESS && HTT_HTC_PKT_STATUS_SUCCESS)
+		htt_htc_misc_pkt_list_add(soc, pkt);
+	else
+		soc->stats.fail_count++;
+	return status;
+}
+
 QDF_STATUS dp_htt_rx_fisa_config(struct dp_pdev *pdev,
 				 struct dp_htt_rx_fisa_cfg *fisa_config);
 

+ 3 - 0
dp/wifi3.0/monitor/1.0/dp_mon_1.0.c

@@ -3356,6 +3356,9 @@ struct dp_mon_ops monitor_ops_1_0 = {
 	.mon_rings_free = dp_mon_rings_free_1_0,
 	.mon_rings_init = dp_mon_rings_init_1_0,
 	.mon_rings_deinit = dp_mon_rings_deinit_1_0,
+	.rx_packet_length_set = NULL,
+	.rx_wmask_subscribe = NULL,
+	.rx_enable_mpdu_logging = NULL,
 };
 
 struct cdp_mon_ops dp_ops_mon_1_0 = {

+ 3 - 0
dp/wifi3.0/monitor/2.0/dp_mon_2.0.c

@@ -791,6 +791,9 @@ struct dp_mon_ops monitor_ops_2_0 = {
 	.tx_mon_desc_pool_deinit = NULL,
 	.tx_mon_desc_pool_alloc = NULL,
 	.tx_mon_desc_pool_free = NULL,
+	.rx_packet_length_set = dp_rx_mon_packet_length_set,
+	.rx_wmask_subscribe = dp_rx_mon_word_mask_subscribe,
+	.rx_enable_mpdu_logging = dp_rx_mon_enable_mpdu_logging,
 };
 
 struct cdp_mon_ops dp_ops_mon_2_0 = {

+ 901 - 1
dp/wifi3.0/monitor/2.0/dp_mon_filter_2.0.c

@@ -20,11 +20,911 @@
 #include "dp_internal.h"
 #include "dp_htt.h"
 #include "dp_mon.h"
+#include "htt.h"
+#include "htc_api.h"
+#include "htc.h"
+#include "htc_packet.h"
 #include "dp_mon_filter.h"
 #include <dp_mon_2.0.h>
 #include <dp_rx_mon_2.0.h>
 #include <dp_mon_filter_2.0.h>
 
+#define HTT_MSG_BUF_SIZE(msg_bytes) \
+   ((msg_bytes) + HTC_HEADER_LEN + HTC_HDR_ALIGNMENT_PADDING)
+
+void dp_rx_mon_packet_length_set(uint32_t *msg_word,
+				 struct htt_rx_ring_tlv_filter *tlv_filter)
+{
+	if (!msg_word || !tlv_filter)
+		return;
+#if QCA_MONITOR_2_0_SUPPORT_WAR /* Yet to get FW support */
+	HTT_RX_MONITOR_CFG_CONFIG_LENGTH_MGMT_SET(*msg_word,
+			tlv_filter->mgmt_dma_length);
+	HTT_RX_MONITOR_CFG_CONFIG_LENGTH_CTRL_SET(*msg_word,
+			tlv_filter->ctrl_dma_length);
+	HTT_RX_MONITOR_CFG_CONFIG_LENGTH_DATA_SET(*msg_word,
+			tlv_filter->data_dma_length);
+#endif
+}
+
+void dp_rx_mon_enable_mpdu_logging(uint32_t *msg_word,
+				   struct htt_rx_ring_tlv_filter *tlv_filter)
+{
+	if (!msg_word || !tlv_filter)
+		return;
+
+#if QCA_MONITOR_2_0_SUPPORT_WAR /* Yet to get FW support */
+	if (htt_tlv_filter->mgmt_mpdu_log)
+		HTT_RX_MONITOR_CFG_MPDU_LOGGING_SET(*msg_word, MGMT,
+						    tlv_filter->mgmt_mpdu_log);
+
+	if (htt_tlv_filter->ctrl_mpdu_log)
+		HTT_RX_MONITOR_CFG_MPDU_LOGGING_SET(*msg_word, CTRL,
+						    tlv_filter->ctrl_mpdu_log);
+
+	if (htt_tlv_filter->data_mpdu_log)
+		HTT_RX_MONITOR_CFG_MPDU_LOGGING_SET(*msg_word, DATA,
+						    tlv_filter->data_mpdu_log);
+#endif
+}
+
+void
+dp_rx_mon_word_mask_subscribe(uint32_t *msg_word,
+				  struct htt_rx_ring_tlv_filter *tlv_filter)
+{
+	if (!msg_word || !tlv_filter)
+		return;
+
+#if QCA_MONITOR_2_0_SUPPORT_WAR /* Yet to get FW support */
+	HTT_RX_RING_SELECTION_CFG_RX_MPDU_START_WMASK_SET(*msg_word,
+			tlv_filter->rx_mpdu_start_word_mask);
+
+	msg_word++;
+	*msg_word = 0;
+	HTT_RX_RING_SELECTION_CFG_RX_MPDU_END_WMASK_SET(*msg_word,
+			tlv_filter->rx_mpdu_end_word_mask);
+	msg_word++;
+	*msg_word = 0;
+	HTT_RX_RING_SELECTION_CFG_RX_MSDU_END_WMASK_SET(*msg_word,
+			tlv_filter->rx_msdu_end_word_mask);
+	HTT_RX_RING_SELECTION_CFG_RX_PACKET_TLV_OFFSET_SET(*msg_word,
+			tlv_filter->rx_pkt_tlv_offset);
+#endif
+}
+
+static void
+htt_tx_tlv_filter_mask_set_in0(uint32_t *msg_word,
+			       struct htt_tx_ring_tlv_filter *htt_tlv_filter)
+{
+	struct dp_tx_mon_downstream_tlv_config *tlv = &htt_tlv_filter->dtlvs;
+
+	if (tlv->tx_fes_setup)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 TX_FES_SETUP,
+							 tlv->tx_fes_setup);
+
+	if (tlv->tx_peer_entry)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 TX_PEER_ENTRY,
+							 tlv->tx_peer_entry);
+
+	if (tlv->tx_queue_extension)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 TX_QUEUE_EXTENSION,
+							 tlv->tx_queue_extension);
+
+	if (tlv->tx_last_mpdu_end)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 TX_LAST_MPDU_END,
+							 tlv->tx_last_mpdu_end);
+
+	if (tlv->tx_last_mpdu_fetched)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 TX_LAST_MPDU_FETCHED,
+							 tlv->tx_last_mpdu_fetched);
+
+	if (tlv->tx_data_sync)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 TX_DATA_SYNC,
+							 tlv->tx_data_sync);
+
+	if (tlv->pcu_ppdu_setup_init)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 PCU_PPDU_SETUP_INIT,
+							 tlv->pcu_ppdu_setup_init);
+
+	if (tlv->fw2s_mon)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 FW2SW_MON,
+							 tlv->fw2s_mon);
+
+	if (tlv->tx_loopback_setup)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 TX_LOOPBACK_SETUP,
+							 tlv->tx_loopback_setup);
+
+	if (tlv->sch_critical_tlv_ref)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 SCH_CRITICAL_TLV_REFERENCE,
+							 tlv->sch_critical_tlv_ref);
+
+	if (tlv->ndp_preamble_done)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 NDP_PREAMBLE_DONE,
+							 tlv->ndp_preamble_done);
+
+	if (tlv->tx_raw_frame_setup)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 TX_RAW_OR_NATIVE_FRAME_SETUP,
+							 tlv->tx_raw_frame_setup);
+
+	if (tlv->txpcu_user_setup)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 TXPCU_USER_SETUP,
+							 tlv->txpcu_user_setup);
+
+	if (tlv->rxpcu_setup)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 RXPCU_SETUP,
+							 tlv->rxpcu_setup);
+
+	if (tlv->rxpcu_setup_complete)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 RXPCU_SETUP_COMPLETE,
+							 tlv->rxpcu_setup_complete);
+
+	if (tlv->coex_tx_req)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 COEX_TX_REQ,
+							 tlv->coex_tx_req);
+
+	if (tlv->rxpcu_user_setup)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 RXPCU_USER_SETUP,
+							 tlv->rxpcu_user_setup);
+
+	if (tlv->rxpcu_user_setup_ext)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 RXPCU_USER_SETUP_EXT,
+							 tlv->rxpcu_user_setup_ext);
+
+	if (tlv->wur_data)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 TX_WUR_DATA,
+							 tlv->wur_data);
+
+	if (tlv->tqm_mpdu_global_start)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 TQM_MPDU_GLOBAL_START,
+							 tlv->tqm_mpdu_global_start);
+
+	if (tlv->tx_fes_setup_complete)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 TX_FES_SETUP_COMPLETE,
+							 tlv->tx_fes_setup_complete);
+
+	if (tlv->scheduler_end)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 SCHEDULER_END,
+							 tlv->scheduler_end);
+
+	if (tlv->sch_wait_instr_tx_path)
+		htt_tx_monitor_tlv_filter_in0_enable_set(*msg_word,
+							 SCH_WAIT_INSTR_TX_PATH,
+							 tlv->sch_wait_instr_tx_path);
+}
+
+static void
+htt_tx_tlv_filter_mask_set_in1(uint32_t *msg_word,
+			       struct htt_tx_ring_tlv_filter *htt_tlv_filter)
+{
+	struct dp_tx_mon_upstream_tlv_config *tlv = &htt_tlv_filter->utlvs;
+
+	if (tlv->rx_response_required_info)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 RX_RESPONSE_REQUIRED_INFO,
+							 tlv->rx_response_required_info);
+
+	if (tlv->response_start_status)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 RESPONSE_START_STATUS,
+							 tlv->response_start_status);
+
+	if (tlv->response_end_status)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 RESPONSE_END_STATUS,
+							 tlv->response_end_status);
+
+	if (tlv->tx_fes_status_start)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 TX_FES_STATUS_START,
+							 tlv->tx_fes_status_start);
+
+	if (tlv->tx_fes_status_end)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 TX_FES_STATUS_END,
+							 tlv->tx_fes_status_end);
+
+	if (tlv->tx_fes_status_start_ppdu)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 TX_FES_STATUS_START_PPDU,
+							 tlv->tx_fes_status_start_ppdu);
+
+	if (tlv->tx_fes_status_user_ppdu)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 TX_FES_STATUS_USER_PPDU,
+							 tlv->tx_fes_status_user_ppdu);
+
+	if (tlv->tx_fes_status_ack_or_ba)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 TX_FES_STATUS_ACK_OR_BA,
+							 tlv->tx_fes_status_ack_or_ba);
+
+	if (tlv->tx_fes_status_1k_ba)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 TX_FES_STATUS_1K_BA,
+							 tlv->tx_fes_status_1k_ba);
+
+	if (tlv->tx_fes_status_start_prot)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 TX_FES_STATUS_START_PROT,
+							 tlv->tx_fes_status_start_prot);
+
+	if (tlv->tx_fes_status_prot)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 TX_FES_STATUS_PROT,
+							 tlv->tx_fes_status_prot);
+
+	if (tlv->tx_fes_status_user_response)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 TX_FES_STATUS_USER_RESPONSE,
+							 tlv->tx_fes_status_user_response);
+
+	if (tlv->rx_frame_bitmap_ack)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 RX_FRAME_BITMAP_ACK,
+							 tlv->rx_frame_bitmap_ack);
+
+	if (tlv->rx_frame_1k_bitmap_ack)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 RX_FRAME_1K_BITMAP_ACK,
+							 tlv->rx_frame_1k_bitmap_ack);
+
+	if (tlv->coex_tx_status)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 COEX_TX_STATUS,
+							 tlv->coex_tx_status);
+
+	if (tlv->recevied_response_info)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 RECEIVED_RESPONSE_INFO,
+							 tlv->recevied_response_info);
+
+	if (tlv->recevied_response_info_p2)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 RECEIVED_RESPONSE_INFO_PART2,
+							 tlv->recevied_response_info_p2);
+
+	if (tlv->ofdma_trigger_details)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 OFDMA_TRIGGER_DETAILS,
+							 tlv->ofdma_trigger_details);
+
+	if (tlv->recevied_trigger_info)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 RECEIVED_TRIGGER_INFO,
+							 tlv->recevied_trigger_info);
+
+	if (tlv->pdg_tx_request)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 PDG_TX_REQUEST,
+							 tlv->pdg_tx_request);
+
+	if (tlv->pdg_response)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 PDG_RESPONSE,
+							 tlv->pdg_response);
+
+	if (tlv->pdg_trig_response)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 PDG_TRIG_RESPONSE,
+							 tlv->pdg_trig_response);
+
+	if (tlv->trigger_response_tx_done)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 TRIGGER_RESPONSE_TX_DONE,
+							 tlv->trigger_response_tx_done);
+
+	if (tlv->prot_tx_end)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 PROT_TX_END,
+							 tlv->prot_tx_end);
+
+	if (tlv->ppdu_tx_end)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 PPDU_TX_END,
+							 tlv->ppdu_tx_end);
+
+	if (tlv->r2r_status_end)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 R2R_STATUS_END,
+							 tlv->r2r_status_end);
+
+	if (tlv->flush_req)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 FLUSH_REQ,
+							 tlv->flush_req);
+
+	if (tlv->mactx_phy_desc)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 MACTX_PHY_DESC,
+							 tlv->mactx_phy_desc);
+
+	if (tlv->mactx_user_desc_cmn)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 MACTX_USER_DESC_COMMON,
+							 tlv->mactx_user_desc_cmn);
+
+#if QCA_MONITOR_2_0_SUPPORT_WAR /* Yet to get FW support */
+	if (tlv->l_sig_a)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 L_SIG_A,
+							 tlv->l_sig_a);
+
+	if (tlv->l_sig_b)
+		htt_tx_monitor_tlv_filter_in1_enable_set(*msg_word,
+							 L_SIG_B,
+							 tlv->l_sig_b);
+#endif
+
+}
+
+static void
+htt_tx_tlv_filter_mask_set_in2(uint32_t *msg_word,
+			       struct htt_tx_ring_tlv_filter *htt_tlv_filter)
+{
+	struct dp_tx_mon_upstream_tlv_config *tlv = &htt_tlv_filter->utlvs;
+
+	if (tlv->ht_sig)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 HT_SIG,
+							 tlv->ht_sig);
+
+	if (tlv->vht_sig_a)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 VHT_SIG_A,
+							 tlv->vht_sig_a);
+
+	if (tlv->vht_sig_b_su20)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 VHT_SIG_B_SU20,
+							 tlv->vht_sig_b_su20);
+
+	if (tlv->vht_sig_b_su40)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 VHT_SIG_B_SU40,
+							 tlv->vht_sig_b_su40);
+
+	if (tlv->vht_sig_b_su80)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 VHT_SIG_B_SU80,
+							 tlv->vht_sig_b_su80);
+
+	if (tlv->vht_sig_b_su160)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 VHT_SIG_B_SU160,
+							 tlv->vht_sig_b_su160);
+
+	if (tlv->vht_sig_b_mu20)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 VHT_SIG_B_MU20,
+							 tlv->vht_sig_b_mu20);
+
+	if (tlv->vht_sig_b_mu40)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 VHT_SIG_B_MU40,
+							 tlv->vht_sig_b_mu40);
+
+	if (tlv->vht_sig_b_mu80)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 VHT_SIG_B_MU80,
+							 tlv->vht_sig_b_mu80);
+
+	if (tlv->vht_sig_b_mu160)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 VHT_SIG_B_MU160,
+							 tlv->vht_sig_b_mu160);
+
+	if (tlv->tx_service)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 TX_SERVICE,
+							 tlv->tx_service);
+
+	if (tlv->he_sig_a_su)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 HE_SIG_A_SU,
+							 tlv->he_sig_a_su);
+
+	if (tlv->he_sig_a_mu_dl)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 HE_SIG_A_MU_DL,
+							 tlv->he_sig_a_mu_dl);
+
+	if (tlv->he_sig_a_mu_ul)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 HE_SIG_A_MU_UL,
+							 tlv->he_sig_a_mu_ul);
+
+	if (tlv->he_sig_b1_mu)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 HE_SIG_B1_MU,
+							 tlv->he_sig_b1_mu);
+
+	if (tlv->he_sig_b2_mu)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 HE_SIG_B2_MU,
+							 tlv->he_sig_b2_mu);
+
+	if (tlv->he_sig_b2_ofdma)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 HE_SIG_B2_OFDMA,
+							 tlv->he_sig_b2_ofdma);
+
+	if (tlv->u_sig_eht_su_mu)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 U_SIG_EHT_SU_MU,
+							 tlv->u_sig_eht_su_mu);
+
+	if (tlv->u_sig_eht_su)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 U_SIG_EHT_SU,
+							 tlv->u_sig_eht_su);
+
+	if (tlv->u_sig_eht_tb)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 U_SIG_EHT_TB,
+							 tlv->u_sig_eht_tb);
+
+	if (tlv->eht_sig_usr_su)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 EHT_SIG_USR_SU,
+							 tlv->eht_sig_usr_su);
+
+	if (tlv->eht_sig_usr_mu_mimo)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 EHT_SIG_USR_MU_MIMO,
+							 tlv->eht_sig_usr_mu_mimo);
+
+	if (tlv->eht_sig_usr_ofdma)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 EHT_SIG_USR_OFDMA,
+							 tlv->eht_sig_usr_ofdma);
+
+	if (tlv->phytx_ppdu_header_info_request)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 PHYTX_PPDU_HEADER_INFO_REQUEST,
+							 tlv->phytx_ppdu_header_info_request);
+
+	if (tlv->tqm_update_tx_mpdu_count)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 TQM_UPDATE_TX_MPDU_COUNT,
+							 tlv->tqm_update_tx_mpdu_count);
+
+	if (tlv->tqm_acked_mpdu)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 TQM_ACKED_MPDU,
+							 tlv->tqm_acked_mpdu);
+
+	if (tlv->tqm_acked_1k_mpdu)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 TQM_ACKED_1K_MPDU,
+							 tlv->tqm_acked_1k_mpdu);
+
+#if QCA_MONITOR_2_0_SUPPORT_WAR /* Yet to get FW support */
+	if (tlv->txpcu_buf_status)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 TXPCU_BUFFER_STATUS,
+							 tlv->txpcu_buf_status);
+
+	if (tlv->txpcu_user_buf_status)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 TXPCU_USER_BUFFER_STATUS,
+							 tlv->txpcu_user_buf_status);
+
+	if (tlv->txdma_stop_request)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 TXDMA_STOP_REQUEST,
+							 tlv->txdma_stop_request);
+
+	if (tlv->expected_response)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 EXPECTED_RESPONSE,
+							 tlv->expected_response);
+
+	if (tlv->tx_mpdu_count_transfer_end)
+		htt_tx_monitor_tlv_filter_in2_enable_set(*msg_word,
+							 TX_MPDU_COUNT_TRANSFER_END,
+							 tlv->tx_mpdu_count_transfer_end);
+#endif
+}
+
+static void
+htt_tx_tlv_filter_mask_set_in3(uint32_t *msg_word,
+			       struct htt_tx_ring_tlv_filter *htt_tlv_filter)
+{
+	struct dp_tx_mon_upstream_tlv_config *tlv = &htt_tlv_filter->utlvs;
+
+	if (tlv->rx_trig_info)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 RX_TRIG_INFO,
+							 tlv->rx_trig_info);
+
+	if (tlv->rxpcu_tx_setup_clear)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 RXPCU_TX_SETUP_CLEAR,
+							 tlv->rxpcu_tx_setup_clear);
+
+	if (tlv->rx_frame_bitmap_req)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 RX_FRAME_BITMAP_REQ,
+							 tlv->rx_frame_bitmap_req);
+
+	if (tlv->rx_phy_sleep)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 RX_PHY_SLEEP,
+							 tlv->rx_phy_sleep);
+
+	if (tlv->txpcu_preamble_done)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 TXPCU_PREAMBLE_DONE,
+							 tlv->txpcu_preamble_done);
+
+	if (tlv->txpcu_phytx_debug32)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 TXPCU_PHYTX_DEBUG32,
+							 tlv->txpcu_phytx_debug32);
+
+	if (tlv->txpcu_phytx_other_transmit_info32)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 TXPCU_PHYTX_OTHER_TRANSMIT_INFO32,
+							 tlv->txpcu_phytx_other_transmit_info32);
+
+	if (tlv->rx_ppdu_noack_report)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 RX_PPDU_NO_ACK_REPORT,
+							 tlv->rx_ppdu_noack_report);
+
+	if (tlv->rx_ppdu_ack_report)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 RX_PPDU_ACK_REPORT,
+							 tlv->rx_ppdu_ack_report);
+
+	if (tlv->coex_rx_status)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 COEX_RX_STATUS,
+							 tlv->coex_rx_status);
+
+	if (tlv->rx_start_param)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 RX_START_PARAM,
+							 tlv->rx_start_param);
+
+	if (tlv->tx_cbf_info)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 TX_CBF_INFO,
+							 tlv->tx_cbf_info);
+
+	if (tlv->rxpcu_early_rx_indication)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 RXPCU_EARLY_RX_INDICATION,
+							 tlv->rxpcu_early_rx_indication);
+
+	if (tlv->received_response_user_7_0)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 RECEIVED_RESPONSE_USER_7_0,
+							 tlv->received_response_user_7_0);
+
+	if (tlv->received_response_user_15_8)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 RECEIVED_RESPONSE_USER_15_8,
+							 tlv->received_response_user_15_8);
+
+	if (tlv->received_response_user_23_16)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 RECEIVED_RESPONSE_USER_23_16,
+							 tlv->received_response_user_23_16);
+
+	if (tlv->received_response_user_31_24)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 RECEIVED_RESPONSE_USER_31_24,
+							 tlv->received_response_user_31_24);
+
+	if (tlv->received_response_user_36_32)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 RECEIVED_RESPONSE_USER_36_32,
+							 tlv->received_response_user_36_32);
+
+	if (tlv->rx_pm_info)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 RX_PM_INFO,
+							 tlv->rx_pm_info);
+
+	if (tlv->rx_preamble)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 RX_PREAMBLE,
+							 tlv->rx_preamble);
+
+	if (tlv->others)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 OTHERS,
+							 tlv->others);
+
+	if (tlv->mactx_pre_phy_desc)
+		htt_tx_monitor_tlv_filter_in3_enable_set(*msg_word,
+							 MACTX_PRE_PHY_DESC,
+							 tlv->mactx_pre_phy_desc);
+}
+
+/*
+ * dp_htt_h2t_send_complete_free_netbuf() - Free completed buffer
+ * @soc:	SOC handl
+ * @status:	Completion status
+ * @netbuf:	HTT buffer
+ */
+static void
+dp_htt_h2t_send_complete_free_netbuf(
+	void *soc, A_STATUS status, qdf_nbuf_t netbuf)
+{
+	qdf_nbuf_free(netbuf);
+}
+
+/*
+ * htt_h2t_tx_ring_cfg() - Send SRNG packet and TLV filter
+ * config message to target
+ * @htt_soc:	HTT SOC handle
+ * @pdev_id:	WIN- PDEV Id, MCL- mac id
+ * @hal_srng:	Opaque HAL SRNG pointer
+ * @hal_ring_type:	SRNG ring type
+ * @ring_buf_size:	SRNG buffer size
+ * @htt_tlv_filter:	Rx SRNG TLV and filter setting
+ * Return: 0 on success; error code on failure
+ */
+int htt_h2t_tx_ring_cfg(struct htt_soc *htt_soc, int pdev_id,
+			hal_ring_handle_t hal_ring_hdl,
+			int hal_ring_type, int ring_buf_size,
+			struct htt_tx_ring_tlv_filter *htt_tlv_filter)
+{
+	struct htt_soc *soc = (struct htt_soc *)htt_soc;
+	struct dp_htt_htc_pkt *pkt;
+	qdf_nbuf_t htt_msg;
+	uint32_t *msg_word;
+	struct hal_srng_params srng_params;
+	uint32_t htt_ring_type, htt_ring_id;
+	uint8_t *htt_logger_bufp;
+	int target_pdev_id;
+	QDF_STATUS status;
+
+	htt_msg = qdf_nbuf_alloc(soc->osdev,
+				 HTT_MSG_BUF_SIZE(HTT_TX_MONITOR_CFG_SZ),
+
+	/* reserve room for the HTC header */
+	HTC_HEADER_LEN + HTC_HDR_ALIGNMENT_PADDING, 4, TRUE);
+	if (!htt_msg)
+		goto fail0;
+
+	hal_get_srng_params(soc->hal_soc, hal_ring_hdl, &srng_params);
+
+#if QCA_MONITOR_2_0_SUPPORT_WAR /* Yet to get FW support */
+	switch (hal_ring_type) {
+	case TX_MONITOR_BUF:
+		htt_ring_id = HTT_TX_MON_HOST2MON_BUF_RING;
+		htt_ring_type = HTT_SW_TO_HW_RING;
+		break;
+	case TX_MONITOR_DST:
+		htt_ring_id = HTT_TX_MON_MON2HOST_DEST_RING;
+		htt_ring_type = HTT_HW_TO_SW_RING;
+		break;
+	default:
+		QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
+			  "%s: Ring currently not supported", __func__);
+		goto fail1;
+	}
+#endif
+
+	/*
+	 * Set the length of the message.
+	 * The contribution from the HTC_HDR_ALIGNMENT_PADDING is added
+	 * separately during the below call to qdf_nbuf_push_head.
+	 * The contribution from the HTC header is added separately inside HTC.
+	 */
+	if (qdf_nbuf_put_tail(htt_msg, HTT_TX_MONITOR_CFG_SZ) == NULL) {
+		QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
+			  "%s: Failed to expand head for TX Ring Cfg msg",
+			  __func__);
+		goto fail1; /* failure */
+	}
+
+	msg_word = (uint32_t *)qdf_nbuf_data(htt_msg);
+
+	/* rewind beyond alignment pad to get to the HTC header reserved area */
+	qdf_nbuf_push_head(htt_msg, HTC_HDR_ALIGNMENT_PADDING);
+
+	/* word 0 */
+	htt_logger_bufp = (uint8_t *)msg_word;
+	*msg_word = 0;
+	HTT_H2T_MSG_TYPE_SET(*msg_word, HTT_H2T_MSG_TYPE_TX_MONITOR_CFG);
+
+	/*
+	 * pdev_id is indexed from 0 whereas mac_id is indexed from 1
+	 * SW_TO_SW and SW_TO_HW rings are unaffected by this
+	 */
+	target_pdev_id =
+	dp_get_target_pdev_id_for_host_pdev_id(soc->dp_soc, pdev_id);
+
+	if (htt_ring_type == HTT_SW_TO_SW_RING ||
+	    htt_ring_type == HTT_SW_TO_HW_RING)
+		HTT_TX_MONITOR_CFG_PDEV_ID_SET(*msg_word,
+					       target_pdev_id);
+
+	HTT_TX_MONITOR_CFG_RING_ID_SET(*msg_word, htt_ring_id);
+
+	HTT_TX_MONITOR_CFG_STATUS_TLV_SET(*msg_word,
+		!!(srng_params.flags & HAL_SRNG_MSI_SWAP));
+
+	/* word 1 */
+	msg_word++;
+	*msg_word = 0;
+	HTT_TX_MONITOR_CFG_RING_BUFFER_SIZE_SET(*msg_word,
+						ring_buf_size);
+
+#if QCA_MONITOR_2_0_SUPPORT_WAR /* Yet to get FW support */
+	if (htt_tlv_filter->mgmt_filter)
+		htt_tx_ring_pkt_type_set(*msg_word, ENABLE_FLAGS,
+					 MGMT, 1);
+
+	if (htt_tlv_filter->ctrl_filter)
+		htt_tx_ring_pkt_type_set(*msg_word, ENABLE_FLAGS,
+					 CTRL, 1);
+
+	if (htt_tlv_filter->data_filter)
+		htt_tx_ring_pkt_type_set(*msg_word, ENABLE_FLAGS,
+					 DATA, 1);
+#endif
+
+	if (htt_tlv_filter->mgmt_dma_length)
+		HTT_TX_MONITOR_CFG_CONFIG_LENGTH_DATA_SET(*msg_word,
+							  htt_tlv_filter->mgmt_dma_length);
+
+	if (htt_tlv_filter->ctrl_dma_length)
+		HTT_TX_MONITOR_CFG_CONFIG_LENGTH_DATA_SET(*msg_word,
+							  htt_tlv_filter->ctrl_dma_length);
+
+	if (htt_tlv_filter->data_dma_length)
+		HTT_TX_MONITOR_CFG_CONFIG_LENGTH_DATA_SET(*msg_word,
+							  htt_tlv_filter->data_dma_length);
+
+	/* word 2*/
+	msg_word++;
+	*msg_word = 0;
+	if (htt_tlv_filter->mgmt_filter)
+		HTT_TX_MONITOR_CFG_PKT_TYPE_ENABLE_FLAGS_SET(*msg_word, 1);
+
+	if (htt_tlv_filter->ctrl_filter)
+		HTT_TX_MONITOR_CFG_PKT_TYPE_ENABLE_FLAGS_SET(*msg_word, 1);
+
+	if (htt_tlv_filter->data_filter)
+		HTT_TX_MONITOR_CFG_PKT_TYPE_ENABLE_FLAGS_SET(*msg_word, 1);
+
+	/* word 3 */
+	msg_word++;
+	*msg_word = 0;
+
+	htt_tx_tlv_filter_mask_set_in0(msg_word, htt_tlv_filter);
+
+	/* word 4 */
+	msg_word++;
+	*msg_word = 0;
+
+	htt_tx_tlv_filter_mask_set_in1(msg_word, htt_tlv_filter);
+
+	/* word 5 */
+	msg_word++;
+	*msg_word = 0;
+
+	htt_tx_tlv_filter_mask_set_in2(msg_word, htt_tlv_filter);
+
+	/* word 6 */
+	msg_word++;
+	*msg_word = 0;
+
+	htt_tx_tlv_filter_mask_set_in3(msg_word, htt_tlv_filter);
+
+	/* word 6 */
+	msg_word++;
+	*msg_word = 0;
+	if (htt_tlv_filter->wmask.tx_fes_setup)
+		HTT_TX_MONITOR_CFG_TX_FES_SETUP_WORD_MASK_SET(*msg_word,
+					htt_tlv_filter->wmask.tx_fes_setup);
+
+	if (htt_tlv_filter->wmask.tx_peer_entry)
+		HTT_TX_MONITOR_CFG_TX_PEER_ENTRY_WORD_MASK_SET(*msg_word,
+					htt_tlv_filter->wmask.tx_peer_entry);
+
+	/* word 7 */
+	msg_word++;
+	*msg_word = 0;
+	if (htt_tlv_filter->wmask.tx_queue_ext)
+		HTT_TX_MONITOR_CFG_TX_QUEUE_EXT_WORD_MASK_SET(*msg_word,
+					htt_tlv_filter->wmask.tx_queue_ext);
+
+	if (htt_tlv_filter->wmask.tx_msdu_start)
+		HTT_TX_MONITOR_CFG_TX_MSDU_START_WORD_MASK_SET(*msg_word,
+					htt_tlv_filter->wmask.tx_msdu_start);
+
+	/* word 8 */
+	msg_word++;
+	*msg_word = 0;
+	if (htt_tlv_filter->wmask.tx_mpdu_start)
+		HTT_TX_MONITOR_CFG_TX_MPDU_START_WORD_MASK_SET(*msg_word,
+					htt_tlv_filter->wmask.tx_mpdu_start);
+
+	if (htt_tlv_filter->wmask.pcu_ppdu_setup_init)
+		HTT_TX_MONITOR_CFG_PCU_PPDU_SETUP_WORD_MASK_SET(*msg_word,
+					htt_tlv_filter->wmask.pcu_ppdu_setup_init);
+
+	/* word 9 */
+	msg_word++;
+	*msg_word = 0;
+	if (htt_tlv_filter->wmask.rxpcu_user_setup)
+		HTT_TX_MONITOR_CFG_RXPCU_USER_SETUP_WORD_MASK_SET(*msg_word,
+					htt_tlv_filter->wmask.rxpcu_user_setup);
+
+#if QCA_MONITOR_2_0_SUPPORT_WAR /* Yet to get FW support */
+	htt_tx_ring_pkt_type_set(*msg_word, ENABLE_MSDU_OR_MPDU_LOGGING,
+				 MGMT,
+				 htt_tlv_filter->mgmt_mpdu_log);
+
+	htt_tx_ring_pkt_type_set(*msg_word, ENABLE_MSDU_OR_MPDU_LOGGING,
+				 CTRL,
+				 htt_tlv_filter->ctrl_mpdu_log);
+
+	htt_tx_ring_pkt_type_set(*msg_word, ENABLE_MSDU_OR_MPDU_LOGGING,
+				 DATA,
+				 htt_tlv_filter->data_mpdu_log);
+#endif
+
+	pkt = htt_htc_pkt_alloc(soc);
+	if (!pkt)
+		goto fail1;
+
+	pkt->soc_ctxt = NULL; /* not used during send-done callback */
+
+	SET_HTC_PACKET_INFO_TX(
+		&pkt->htc_pkt,
+		dp_htt_h2t_send_complete_free_netbuf,
+		qdf_nbuf_data(htt_msg),
+		qdf_nbuf_len(htt_msg),
+		soc->htc_endpoint,
+		HTC_TX_PACKET_TAG_RUNTIME_PUT); /* tag for no FW response msg */
+
+	SET_HTC_PACKET_NET_BUF_CONTEXT(&pkt->htc_pkt, htt_msg);
+	status = DP_HTT_SEND_HTC_PKT(soc, pkt,
+				     HTT_H2T_MSG_TYPE_TX_MONITOR_CFG,
+				     htt_logger_bufp);
+
+	if (status != QDF_STATUS_SUCCESS) {
+		qdf_nbuf_free(htt_msg);
+		htt_htc_pkt_free(soc, pkt);
+	}
+
+	return status;
+
+fail1:
+	qdf_nbuf_free(htt_msg);
+fail0:
+	return QDF_STATUS_E_FAILURE;
+}
+
 #ifdef QCA_ENHANCED_STATS_SUPPORT
 void dp_mon_filter_setup_enhanced_stats_2_0(struct dp_pdev *pdev)
 {
@@ -101,5 +1001,5 @@ void dp_mon_filter_reset_rx_pktlog_cbf_2_0(struct dp_pdev *pdev)
 
 QDF_STATUS dp_mon_filter_update_2_0(struct dp_pdev *pdev)
 {
-	return status;
+	return QDF_STATUS_SUCCESS;
 }

+ 28 - 3
dp/wifi3.0/monitor/2.0/dp_mon_filter_2.0.h

@@ -31,10 +31,36 @@ struct dp_mon_filter_be {
 	int tx_valid;
 };
 
+/**
+ * dp_rx_mon_packet_length_set() - Setup rx monitor per packet type length
+ * @msg_word: msg word
+ * @htt_tlv_filter: rx ring filter configuration
+ */
+void
+dp_rx_mon_packet_length_set(uint32_t *msg_word,
+			    struct htt_rx_ring_tlv_filter *tlvi_filter);
+
+/**
+ * dp_rx_mon_word_mask_subscribe() - Setup rx monitor word mask subscription
+ * @msg_word: msg word
+ * @htt_tlv_filter: rx ring filter configuration
+ */
+void
+dp_rx_mon_word_mask_subscribe(uint32_t *msg_word,
+			      struct htt_rx_ring_tlv_filter *tlv_filter);
+
+/**
+ * dp_rx_mon_enable_mpdu_logging() - Setup rx monitor per packet mpdu logging
+ * @msg_word: msg word
+ * @htt_tlv_filter: rx ring filter configuration
+ */
+void
+dp_rx_mon_enable_mpdu_logging(uint32_t *msg_word,
+			      struct htt_rx_ring_tlv_filter *tlv_filter);
+
 #ifdef QCA_ENHANCED_STATS_SUPPORT
 /**
  * dp_mon_filter_setup_enhanced_stats() - Setup the enhanced stats filter
- * @pdev: Monitor DP pdev handle
  * @pdev: DP pdev handle
  */
 void dp_mon_filter_setup_enhanced_stats_2_0(struct dp_pdev *pdev);
@@ -89,7 +115,6 @@ void dp_mon_filter_setup_smart_monitor_2_0(struct dp_pdev *pdev);
 
 /**
  * dp_mon_filter_reset_smart_monitor() - Reset the smart monitor mode filter
- * @pdev: monitor pdev handle
  * @pdev: DP pdev handle
  */
 void dp_mon_filter_reset_smart_monitor_2_0(struct dp_pdev *pdev);
@@ -163,7 +188,7 @@ void dp_mon_filter_setup_rx_pkt_log_lite_2_0(struct dp_pdev *pdev);
 
 /**
  * dp_mon_filter_reset_rx_pkt_log_lite() - Reset the Rx pktlog lite mode filter
- * @pdev: Monitor pdev handle
+ * @pdev: DP pdev handle
  */
 void dp_mon_filter_reset_rx_pkt_log_lite_2_0(struct dp_pdev *pdev);
 

+ 72 - 0
dp/wifi3.0/monitor/dp_mon.h

@@ -511,6 +511,12 @@ struct dp_mon_ops {
 	void (*tx_mon_desc_pool_deinit)(struct dp_pdev *pdev);
 	QDF_STATUS (*tx_mon_desc_pool_alloc)(struct dp_pdev *pdev);
 	void (*tx_mon_desc_pool_free)(struct dp_pdev *pdev);
+	void (*rx_packet_length_set)(uint32_t *msg_word,
+				     struct htt_rx_ring_tlv_filter *tlv_filter);
+	void (*rx_wmask_subscribe)(uint32_t *msg_word,
+				   struct htt_rx_ring_tlv_filter *tlv_filter);
+	void (*rx_enable_mpdu_logging)(uint32_t *msg_word,
+				       struct htt_rx_ring_tlv_filter *tlv_filter);
 };
 
 struct dp_mon_soc {
@@ -2948,6 +2954,72 @@ void dp_monitor_pdev_reset_scan_spcl_vap_stats_enable(struct dp_pdev *pdev,
 }
 #endif
 
+static inline void
+dp_mon_rx_wmask_subscribe(struct dp_soc *soc, uint32_t *msg_word,
+			  struct htt_rx_ring_tlv_filter *tlv_filter)
+{
+	struct dp_mon_soc *mon_soc = soc->monitor_soc;
+	struct dp_mon_ops *monitor_ops;
+
+	if (!mon_soc) {
+		dp_mon_debug("mon soc is NULL");
+		return;
+
+	}
+
+	monitor_ops = mon_soc->mon_ops;
+	if (!monitor_ops || !monitor_ops->rx_wmask_subscribe) {
+		dp_mon_debug("callback not registered");
+		return;
+	}
+
+	monitor_ops->rx_wmask_subscribe(msg_word, tlv_filter);
+}
+
+static inline void
+dp_mon_rx_enable_mpdu_logging(struct dp_soc *soc, uint32_t *msg_word,
+			      struct htt_rx_ring_tlv_filter *tlv_filter)
+{
+	struct dp_mon_soc *mon_soc = soc->monitor_soc;
+	struct dp_mon_ops *monitor_ops;
+
+	if (!mon_soc) {
+		dp_mon_debug("mon soc is NULL");
+		return;
+
+	}
+
+	monitor_ops = mon_soc->mon_ops;
+	if (!monitor_ops || !monitor_ops->rx_enable_mpdu_logging) {
+		dp_mon_debug("callback not registered");
+		return;
+	}
+
+	monitor_ops->rx_enable_mpdu_logging(msg_word, tlv_filter);
+}
+
+static inline void
+dp_mon_rx_packet_length_set(struct dp_soc *soc, uint32_t *msg_word,
+			    struct htt_rx_ring_tlv_filter *tlv_filter)
+{
+	struct dp_mon_soc *mon_soc = soc->monitor_soc;
+	struct dp_mon_ops *monitor_ops;
+
+	if (!mon_soc) {
+		dp_mon_debug("mon soc is NULL");
+		return;
+
+	}
+
+	monitor_ops = mon_soc->mon_ops;
+	if (!monitor_ops || !monitor_ops->rx_packet_length_set) {
+		dp_mon_debug("callback not registered");
+		return;
+	}
+
+	monitor_ops->rx_packet_length_set(msg_word, tlv_filter);
+}
+
 #ifdef QCA_ENHANCED_STATS_SUPPORT
 QDF_STATUS dp_peer_qos_stats_notify(struct dp_pdev *dp_pdev,
 				    struct cdp_rx_stats_ppdu_user *ppdu_user);