Просмотр исходного кода

qcacmn: Properly handle IPA TX alt ring

If IPA tx alt doorbell address is not returned from IPA, wlan
should not touch the tx alt paddr and vaddr either. Therefore
add the NULL check before handling the tx alt ring resources.

Change-Id: I6b98fe5c003f3e796441513515190ea592d14d01
CRs-Fixed: 3339322
Jia Ding 2 лет назад
Родитель
Сommit
0ffd9de547
1 измененных файлов с 9 добавлено и 1 удалено
  1. 9 1
      dp/wifi3.0/dp_ipa.c

+ 9 - 1
dp/wifi3.0/dp_ipa.c

@@ -52,8 +52,10 @@
  * this issue.
  */
 #define DP_IPA_WAR_WBM2SW_REL_RING_NO_BUF_ENTRIES 16
+
 /**
  *struct dp_ipa_reo_remap_record - history for dp ipa reo remaps
+ * @timestamp: Timestamp when remap occurs
  * @ix0_reg: reo destination ring IX0 value
  * @ix2_reg: reo destination ring IX2 value
  * @ix3_reg: reo destination ring IX3 value
@@ -484,7 +486,7 @@ static void dp_ipa_tx_alt_pool_detach(struct dp_soc *soc, struct dp_pdev *pdev)
 	soc->ipa_uc_tx_rsc_alt.tx_buf_pool_vaddr_unaligned = NULL;
 
 	ipa_res = &pdev->ipa_resource;
-	if (!ipa_res->is_db_ddr_mapped)
+	if (!ipa_res->is_db_ddr_mapped && ipa_res->tx_alt_comp_doorbell_vaddr)
 		iounmap(ipa_res->tx_alt_comp_doorbell_vaddr);
 
 	qdf_mem_free_sgtable(&ipa_res->tx_alt_ring.sgtable);
@@ -949,6 +951,9 @@ static void dp_ipa_tx_comp_ring_init_hp(struct dp_soc *soc,
 			     res->tx_comp_doorbell_vaddr);
 
 	/* Init the alternate TX comp ring */
+	if (!res->tx_alt_comp_doorbell_paddr)
+		return;
+
 	wbm_srng = (struct hal_srng *)
 		soc->tx_comp_ring[IPA_TX_ALT_COMP_RING_IDX].hal_srng;
 
@@ -972,6 +977,9 @@ static void dp_ipa_set_tx_doorbell_paddr(struct dp_soc *soc,
 		(void *)ipa_res->tx_comp_doorbell_vaddr);
 
 	/* Setup for alternative TX comp ring */
+	if (!ipa_res->tx_alt_comp_doorbell_paddr)
+		return;
+
 	wbm_srng = (struct hal_srng *)
 			soc->tx_comp_ring[IPA_TX_ALT_COMP_RING_IDX].hal_srng;