Browse Source

qcacld-3.0: Add function to convert HW to qdf status

Enhance qdf tx rx to hw tx completion status mapping.
Add inline function to convert hw status to qdf
status. Add dummy argument to qdf_dp_trace_ptr function.

Change-Id: If225bf385a3ce12f354f761594bf3d51ff710a13
CRs-Fixed: 2810592
sandhu 4 years ago
parent
commit
a31cfcd002
3 changed files with 29 additions and 6 deletions
  1. 22 0
      core/dp/txrx/ol_tx.h
  2. 2 2
      core/dp/txrx/ol_tx_ll_fastpath.c
  3. 5 4
      core/dp/txrx/ol_tx_send.c

+ 22 - 0
core/dp/txrx/ol_tx.h

@@ -119,6 +119,28 @@ void ol_tx_pdev_ll_pause_queue_send_all(struct ol_txrx_pdev_t *pdev)
 }
 #endif
 
+/**
+ * ol_tx_comp_hw_to_qdf_status(): map ol hw to qdf status
+ * @status: hw status
+ *
+ * Return: qdf tx rx status
+ */
+static inline enum qdf_dp_tx_rx_status
+ol_tx_comp_hw_to_qdf_status(uint16_t status)
+{
+	switch (status) {
+	case HTT_TX_COMPL_IND_STAT_OK:
+		return QDF_TX_RX_STATUS_OK;
+	case HTT_TX_COMPL_IND_STAT_DISCARD:
+	case HTT_TX_COMPL_IND_STAT_DROP:
+		return QDF_TX_RX_STATUS_FW_DISCARD;
+	case HTT_TX_COMPL_IND_STAT_NO_ACK:
+		return QDF_TX_RX_STATUS_NO_ACK;
+	default:
+		return QDF_TX_RX_STATUS_DEFAULT;
+	}
+}
+
 static inline
 int ol_txrx_tx_is_raw(enum ol_tx_spec tx_spec)
 {

+ 2 - 2
core/dp/txrx/ol_tx_ll_fastpath.c

@@ -105,7 +105,7 @@ static inline void ol_tx_trace_pkt(qdf_nbuf_t skb, uint16_t msdu_id,
 				 QDF_TRACE_DEFAULT_PDEV_ID,
 				 qdf_nbuf_data_addr(skb),
 				 sizeof(qdf_nbuf_data(skb)),
-				 msdu_id, vdev_id));
+				 msdu_id, vdev_id, 0));
 
 	qdf_dp_trace_log_pkt(vdev_id, skb, QDF_TX, QDF_TRACE_DEFAULT_PDEV_ID);
 
@@ -593,7 +593,7 @@ 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));
+				vdev->vdev_id, 0));
 			/*
 			 * If debug display is enabled, show the meta-data being
 			 * downloaded to the target via the HTT tx descriptor.

+ 5 - 4
core/dp/txrx/ol_tx_send.c

@@ -209,7 +209,7 @@ 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));
+				vdev_id, 0));
 	failed = htt_tx_send_std(pdev->htt_pdev, msdu, id);
 	if (qdf_unlikely(failed)) {
 		ol_tx_target_credit_incr_int(pdev, msdu_credit_consumed);
@@ -343,7 +343,7 @@ 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));
+				 dp_status, 0));
 
 	is_frame_freed = ol_tx_download_done_base(pdev, status, msdu, msdu_id);
 
@@ -1065,13 +1065,14 @@ ol_tx_completion_handler(ol_txrx_pdev_handle pdev,
 					      netbuf, status, TX_DATA_PKT);
 		}
 #endif
-		dp_status = qdf_dp_get_status_from_htt(status);
+		dp_status = ol_tx_comp_hw_to_qdf_status(status);
 
 		DPTRACE(qdf_dp_trace_ptr(netbuf,
 			QDF_DP_TRACE_FREE_PACKET_PTR_RECORD,
 			QDF_TRACE_DEFAULT_PDEV_ID,
 			qdf_nbuf_data_addr(netbuf),
-			sizeof(qdf_nbuf_data(netbuf)), tx_desc->id, dp_status));
+			sizeof(qdf_nbuf_data(netbuf)), tx_desc->id, status,
+			dp_status));
 		htc_pm_runtime_put(pdev->htt_pdev->htc_pdev);
 		/*
 		 * If credits are reported through credit_update_ind then do not