From bcf8d7b876bb1e7a61c7307b8ccf15129a818c3e Mon Sep 17 00:00:00 2001 From: Nisha Menon Date: Wed, 2 Dec 2020 18:19:57 -0800 Subject: [PATCH] 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 --- dp/wifi3.0/dp_ipa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dp/wifi3.0/dp_ipa.c b/dp/wifi3.0/dp_ipa.c index 73d14017eb..4a41da9e55 100644 --- a/dp/wifi3.0/dp_ipa.c +++ b/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;