瀏覽代碼

qcacmn: Fix peer ref_cnt unmatch issue in TQM bypass mode

The reference counter will be increased after using peer find by
id API. So the unreference operation must be performed whenever
the peer which is returned by this API is released. Fix one peer
ref_cnt unmatch issue in TQM bypass mode.

CRs-Fixed: 2348316
Change-Id: Icae09b351315f38d9b7521b29c0e930339c9f83a
chenguo 6 年之前
父節點
當前提交
420a4425dc
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      dp/wifi3.0/dp_tx.c

+ 5 - 2
dp/wifi3.0/dp_tx.c

@@ -3031,8 +3031,11 @@ void dp_tx_process_htt_completion(struct dp_tx_desc_s *tx_desc, uint8_t *status)
 			ts.status = HAL_TX_TQM_RR_REM_CMD_REM;
 
 		peer = dp_peer_find_by_id(soc, ts.peer_id);
-		dp_tx_comp_process_tx_status(tx_desc, &ts, peer);
-		dp_tx_comp_process_desc(soc, tx_desc, &ts, peer);
+		if (qdf_likely(peer)) {
+			dp_tx_comp_process_tx_status(tx_desc, &ts, peer);
+			dp_tx_comp_process_desc(soc, tx_desc, &ts, peer);
+			dp_peer_unref_del_find_by_id(peer);
+		}
 		dp_tx_desc_release(tx_desc, tx_desc->pool_id);
 
 		break;