소스 검색

qcacmn: Get correct peer id in htt tx completion

Currently in htt tx completion for MLO connection
host is not converting peer id into ml peer id.

Due to wrong peer_id host is not able to find txrx_peer
due to which stats are not getting updated.

To fix the issue in case of MLO connection convert
received peer_id into MLO peer_id.

Change-Id: I2e90104053d59a319d46a2628c4e9cdcb32832a0
CRs-Fixed: 3574182
Amit Mehta 1 년 전
부모
커밋
8a052c3b88
2개의 변경된 파일18개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 1
      dp/wifi3.0/be/dp_be_tx.c
  2. 15 4
      dp/wifi3.0/be/dp_be_tx.h

+ 3 - 1
dp/wifi3.0/be/dp_be_tx.c

@@ -252,6 +252,7 @@ void dp_tx_process_htt_completion_be(struct dp_soc *soc,
 	struct cdp_tid_tx_stats *tid_stats = NULL;
 	struct htt_soc *htt_handle;
 	uint8_t vdev_id;
+	uint16_t peer_id;
 
 	tx_status = HTT_TX_WBM_COMPLETION_V3_TX_STATUS_GET(htt_desc[0]);
 	htt_handle = (struct htt_soc *)soc->htt_handle;
@@ -354,7 +355,8 @@ void dp_tx_process_htt_completion_be(struct dp_soc *soc,
 		if (tx_status < CDP_MAX_TX_HTT_STATUS)
 			tid_stats->htt_status_cnt[tx_status]++;
 
-		txrx_peer = dp_txrx_peer_get_ref_by_id(soc, ts.peer_id,
+		peer_id = dp_tx_comp_adjust_peer_id_be(soc, ts.peer_id);
+		txrx_peer = dp_txrx_peer_get_ref_by_id(soc, peer_id,
 						       &txrx_ref_handle,
 						       DP_MOD_ID_HTT_COMP);
 		if (qdf_likely(txrx_peer))

+ 15 - 4
dp/wifi3.0/be/dp_be_tx.h

@@ -50,6 +50,15 @@ struct __attribute__((__packed__)) dp_tx_comp_peer_id {
 #define DP_TX_L3_L4_CSUM_ENABLE	0x1f
 
 #ifdef DP_USE_REDUCED_PEER_ID_FIELD_WIDTH
+static inline uint16_t
+dp_tx_comp_adjust_peer_id_be(struct dp_soc *soc, uint16_t peer_id)
+{
+	struct dp_tx_comp_peer_id *tx_peer_id =
+		(struct dp_tx_comp_peer_id *)&peer_id;
+
+	return (tx_peer_id->peer_id |
+		(tx_peer_id->ml_peer_valid << soc->peer_id_shift));
+}
 /**
  * dp_tx_comp_get_peer_id_be() - Get peer ID from TX Comp Desc
  * @soc: Handle to DP Soc structure
@@ -61,13 +70,15 @@ static inline uint16_t dp_tx_comp_get_peer_id_be(struct dp_soc *soc,
 						 void *tx_comp_hal_desc)
 {
 	uint16_t peer_id = hal_tx_comp_get_peer_id(tx_comp_hal_desc);
-	struct dp_tx_comp_peer_id *tx_peer_id =
-			(struct dp_tx_comp_peer_id *)&peer_id;
 
-	return (tx_peer_id->peer_id |
-		(tx_peer_id->ml_peer_valid << soc->peer_id_shift));
+	return dp_tx_comp_adjust_peer_id_be(soc, peer_id);
 }
 #else
+static inline uint16_t
+dp_tx_comp_adjust_peer_id_be(struct dp_soc *soc, uint16_t peer_id)
+{
+	return peer_id;
+}
 static inline uint16_t dp_tx_comp_get_peer_id_be(struct dp_soc *soc,
 						 void *tx_comp_hal_desc)
 {