Procházet zdrojové kódy

qcacld-3.0: Only allow connectivity logging for STA mode

Currently connectivity logging is done for all opmode
but logging should be done only for STA mode.

So to fix the issue add check for opmode and skip
connectivity logging if opmode is not STA

Change-Id: Iae225faa0fb7f141a46979c90ac4c2374f8a8832
CRs-Fixed: 3515363
Amit Mehta před 1 rokem
rodič
revize
e5679f29ad

+ 2 - 1
components/dp/core/src/wlan_dp_softap_txrx.c

@@ -856,7 +856,8 @@ QDF_STATUS dp_softap_rx_packet_cbk(void *intf_ctx, qdf_nbuf_t rx_buf)
 
 		dp_event_eapol_log(nbuf, QDF_RX);
 		qdf_dp_trace_log_pkt(dp_intf->intf_id,
-				     nbuf, QDF_RX, QDF_TRACE_DEFAULT_PDEV_ID);
+				     nbuf, QDF_RX, QDF_TRACE_DEFAULT_PDEV_ID,
+				     dp_intf->device_mode);
 		DPTRACE(qdf_dp_trace(nbuf,
 				     QDF_DP_TRACE_RX_PACKET_PTR_RECORD,
 				     QDF_TRACE_DEFAULT_PDEV_ID,

+ 2 - 1
components/dp/core/src/wlan_dp_txrx.c

@@ -1710,7 +1710,8 @@ QDF_STATUS dp_rx_packet_cbk(void *dp_intf_context,
 
 		dp_event_eapol_log(nbuf, QDF_RX);
 		qdf_dp_trace_log_pkt(dp_intf->intf_id, nbuf, QDF_RX,
-				     QDF_TRACE_DEFAULT_PDEV_ID);
+				     QDF_TRACE_DEFAULT_PDEV_ID,
+				     dp_intf->device_mode);
 
 		DPTRACE(qdf_dp_trace(nbuf,
 				     QDF_DP_TRACE_RX_PACKET_PTR_RECORD,

+ 3 - 2
core/dp/txrx/ol_rx.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -1833,7 +1833,8 @@ ol_rx_offload_paddr_deliver_ind_handler(htt_pdev_handle htt_pdev,
 						QDF_NBUF_TX_PKT_DATA_TRACK;
 			qdf_dp_trace_log_pkt(peer->vdev->vdev_id,
 				head_buf, QDF_RX,
-				QDF_TRACE_DEFAULT_PDEV_ID);
+				QDF_TRACE_DEFAULT_PDEV_ID,
+				peer->vdev->qdf_opmode);
 			DPTRACE(qdf_dp_trace(head_buf,
 				QDF_DP_TRACE_RX_OFFLOAD_HTT_PACKET_PTR_RECORD,
 				QDF_TRACE_DEFAULT_PDEV_ID,

+ 3 - 1
core/dp/txrx/ol_tx.h

@@ -238,10 +238,12 @@ ol_tx_non_std(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
  * @skb: skb to be traced
  * @msdu_id: msdu_id of the packet
  * @vdev_id: vdev_id of the packet
+ * @op_mode: Vdev Operation mode
  *
  * Return: None
  */
-void ol_tx_trace_pkt(qdf_nbuf_t skb, uint16_t msdu_id, uint8_t vdev_id);
+void ol_tx_trace_pkt(qdf_nbuf_t skb, uint16_t msdu_id, uint8_t vdev_id,
+		     enum QDF_OPMODE op_mode);
 
 void ol_txrx_mgmt_tx_complete(void *ctxt, qdf_nbuf_t netbuf, int err);
 

+ 2 - 1
core/dp/txrx/ol_tx_hl.c

@@ -518,7 +518,8 @@ ol_tx_hl_base(
 		/* OL_TXRX_PROT_AN_LOG(pdev->prot_an_tx_sent, msdu);*/
 
 		qdf_dp_trace_log_pkt(vdev->vdev_id, msdu, QDF_TX,
-				     QDF_TRACE_DEFAULT_PDEV_ID);
+				     QDF_TRACE_DEFAULT_PDEV_ID,
+				     vdev->qdf_opmode);
 		DPTRACE(qdf_dp_trace_data_pkt(msdu, QDF_TRACE_DEFAULT_PDEV_ID,
 					      QDF_DP_TRACE_TX_PACKET_RECORD,
 					      tx_desc->id, QDF_TX));

+ 6 - 3
core/dp/txrx/ol_tx_ll.c

@@ -187,16 +187,19 @@ ol_tx_non_std_ll(struct ol_txrx_vdev_t *vdev,
 	return NULL;            /* all MSDUs were accepted */
 }
 
-void ol_tx_trace_pkt(qdf_nbuf_t skb, uint16_t msdu_id, uint8_t vdev_id)
+void ol_tx_trace_pkt(qdf_nbuf_t skb, uint16_t msdu_id, uint8_t vdev_id,
+		     enum QDF_OPMODE op_mode)
 {
 	DPTRACE(qdf_dp_trace_ptr(skb,
 				 QDF_DP_TRACE_TXRX_FAST_PACKET_PTR_RECORD,
 				 QDF_TRACE_DEFAULT_PDEV_ID,
 				 qdf_nbuf_data_addr(skb),
 				 sizeof(qdf_nbuf_data(skb)),
-				 msdu_id, vdev_id, 0));
+				 msdu_id, vdev_id, 0,
+				 op_mode));
 
-	qdf_dp_trace_log_pkt(vdev_id, skb, QDF_TX, QDF_TRACE_DEFAULT_PDEV_ID);
+	qdf_dp_trace_log_pkt(vdev_id, skb, QDF_TX, QDF_TRACE_DEFAULT_PDEV_ID,
+			     op_mode);
 
 	DPTRACE(qdf_dp_trace_data_pkt(skb, QDF_TRACE_DEFAULT_PDEV_ID,
 				      QDF_DP_TRACE_TX_PACKET_RECORD,

+ 5 - 3
core/dp/txrx/ol_tx_ll_fastpath.c

@@ -418,7 +418,8 @@ ol_tx_ll_fast(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list)
 					qdf_nbuf_inc_users(msdu);
 
 				ol_tx_trace_pkt(msdu, tx_desc->id,
-						vdev->vdev_id);
+						vdev->vdev_id,
+						vdev->qdf_opmode);
 				/*
 				 * If debug display is enabled, show the meta
 				 * data being downloaded to the target via the
@@ -568,9 +569,10 @@ ol_tx_ll_fast(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list)
 				QDF_TRACE_DEFAULT_PDEV_ID,
 				qdf_nbuf_data_addr(msdu),
 				sizeof(qdf_nbuf_data(msdu)), tx_desc->id,
-				vdev->vdev_id, 0));
+				vdev->vdev_id, 0, vdev->qdf_opmode));
 
-			ol_tx_trace_pkt(msdu, tx_desc->id, vdev->vdev_id);
+			ol_tx_trace_pkt(msdu, tx_desc->id, vdev->vdev_id,
+					vdev->qdf_opmode);
 			/*
 			 * If debug display is enabled, show the meta-data being
 			 * downloaded to the target via the HTT tx descriptor.

+ 4 - 2
core/dp/txrx/ol_tx_ll_legacy.c

@@ -113,7 +113,8 @@ qdf_nbuf_t ol_tx_ll(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list)
 			if (!tx_desc)
 				return msdu;
 
-			ol_tx_trace_pkt(msdu, tx_desc->id, vdev->vdev_id);
+			ol_tx_trace_pkt(msdu, tx_desc->id, vdev->vdev_id,
+					vdev->qdf_opmode);
 
 			/*
 			 * If this is a jumbo nbuf, then increment the number
@@ -177,7 +178,8 @@ qdf_nbuf_t ol_tx_ll(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list)
 		if (!tx_desc)
 			return msdu;
 
-		ol_tx_trace_pkt(msdu, tx_desc->id, vdev->vdev_id);
+		ol_tx_trace_pkt(msdu, tx_desc->id, vdev->vdev_id,
+				vdev->qdf_opmode);
 
 		TXRX_STATS_MSDU_INCR(vdev->pdev, tx.from_stack, msdu);
 

+ 8 - 3
core/dp/txrx/ol_tx_send.c

@@ -211,7 +211,9 @@ ol_tx_send(struct ol_txrx_pdev_t *pdev,
 				QDF_TRACE_DEFAULT_PDEV_ID,
 				qdf_nbuf_data_addr(msdu),
 				sizeof(qdf_nbuf_data(msdu)), tx_desc->id,
-				vdev_id, 0));
+				vdev_id, 0,
+				tx_desc->vdev->qdf_opmode
+				));
 	failed = htt_tx_send_std(pdev->htt_pdev, msdu, id);
 	if (qdf_unlikely(failed)) {
 		ol_tx_target_credit_incr_int(pdev, msdu_credit_consumed);
@@ -345,7 +347,9 @@ ol_tx_download_done_hl_free(void *txrx_pdev,
 				 QDF_TRACE_DEFAULT_PDEV_ID,
 				 qdf_nbuf_data_addr(msdu),
 				 sizeof(qdf_nbuf_data(msdu)), tx_desc->id,
-				 dp_status, 0));
+				 dp_status, 0,
+				 tx_desc->vdev->qdf_opmode
+				 ));
 
 	is_frame_freed = ol_tx_download_done_base(pdev, status, msdu, msdu_id);
 
@@ -1116,7 +1120,8 @@ ol_tx_completion_handler(ol_txrx_pdev_handle pdev,
 			QDF_TRACE_DEFAULT_PDEV_ID,
 			qdf_nbuf_data_addr(netbuf),
 			sizeof(qdf_nbuf_data(netbuf)), tx_desc->id, status,
-			dp_status));
+			dp_status,
+			tx_desc->vdev->qdf_opmode));
 
 		/*
 		 * If credits are reported through credit_update_ind then do not

+ 2 - 0
core/dp/txrx/ol_txrx.c

@@ -1936,6 +1936,7 @@ ol_txrx_vdev_attach(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
 	uint8_t vdev_id = vdev_info->vdev_id;
 	enum wlan_op_mode op_mode = vdev_info->op_mode;
 	enum wlan_op_subtype subtype = vdev_info->subtype;
+	enum QDF_OPMODE qdf_opmode = vdev_info->qdf_opmode;
 
 	struct ol_txrx_vdev_t *vdev;
 	QDF_STATUS qdf_status;
@@ -1958,6 +1959,7 @@ ol_txrx_vdev_attach(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
 	vdev->vdev_id = vdev_id;
 	vdev->opmode = op_mode;
 	vdev->subtype = subtype;
+	vdev->qdf_opmode = qdf_opmode;
 
 	vdev->delete.pending = 0;
 	vdev->safemode = 0;

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

@@ -1245,6 +1245,7 @@ struct ol_txrx_vdev_t {
 
 	enum wlan_op_mode opmode;
 	enum wlan_op_subtype subtype;
+	enum QDF_OPMODE qdf_opmode;
 
 #ifdef QCA_IBSS_SUPPORT
 	/* ibss mode related */

+ 2 - 1
core/hdd/src/wlan_hdd_ipa.c

@@ -205,7 +205,8 @@ void hdd_ipa_send_nbuf_to_network(qdf_nbuf_t nbuf, qdf_netdev_t dev)
 
 	ucfg_dp_event_eapol_log(nbuf, QDF_RX);
 	qdf_dp_trace_log_pkt(adapter->deflink->vdev_id,
-			     nbuf, QDF_RX, QDF_TRACE_DEFAULT_PDEV_ID);
+			     nbuf, QDF_RX, QDF_TRACE_DEFAULT_PDEV_ID,
+			     adapter->device_mode);
 	DPTRACE(qdf_dp_trace(nbuf,
 			     QDF_DP_TRACE_RX_HDD_PACKET_PTR_RECORD,
 			     QDF_TRACE_DEFAULT_PDEV_ID,