Jelajahi Sumber

qcacmn: Account for IPA Tx buffers memory

Account for the Tx buffers allocated for IPA during
init. Add this memory to the overall Tx nbuf memory
allocations. Ensure that the nbuf size is taken from
end pointer to head pointer of nbuf.

Change-Id: Ie3a46c7e7674f3f2e1bf9e0791a7eb53d4bb0b21
CRs-Fixed: 2831015
Nisha Menon 4 tahun lalu
induk
melakukan
bcf8d7b876
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      dp/wifi3.0/dp_ipa.c

+ 2 - 2
dp/wifi3.0/dp_ipa.c

@@ -313,7 +313,7 @@ static void dp_tx_ipa_uc_detach(struct dp_soc *soc, struct dp_pdev *pdev)
 			continue;
 		qdf_nbuf_unmap_single(soc->osdev, nbuf, QDF_DMA_BIDIRECTIONAL);
 		qdf_mem_dp_tx_skb_cnt_dec();
-		qdf_mem_dp_tx_skb_dec(qdf_nbuf_get_data_len(nbuf));
+		qdf_mem_dp_tx_skb_dec(qdf_nbuf_get_end_offset(nbuf));
 		qdf_nbuf_free(nbuf);
 		soc->ipa_uc_tx_rsc.tx_buf_pool_vaddr_unaligned[idx] =
 						(void *)NULL;
@@ -448,7 +448,7 @@ static int dp_tx_ipa_uc_attach(struct dp_soc *soc, struct dp_pdev *pdev)
 				    QDF_DMA_BIDIRECTIONAL);
 		buffer_paddr = qdf_nbuf_get_frag_paddr(nbuf, 0);
 		qdf_mem_dp_tx_skb_cnt_inc();
-		qdf_mem_dp_tx_skb_inc(qdf_nbuf_get_data_len(nbuf));
+		qdf_mem_dp_tx_skb_inc(qdf_nbuf_get_end_offset(nbuf));
 
 		paddr_lo = ((uint64_t)buffer_paddr & 0x00000000ffffffff);
 		paddr_hi = ((uint64_t)buffer_paddr & 0x0000001f00000000) >> 32;