Skip to content

Commit bb97131

Browse files
Thomas-fourierjeff-t-johnson
authored andcommitted
wifi: ath12k: fix dma_free_coherent() pointer
dma_alloc_coherent() allocates a DMA mapped buffer and stores the addresses in XXX_unaligned fields. Those should be reused when freeing the buffer rather than the aligned addresses. Fixes: d889913 ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Cc: stable@vger.kernel.org Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20260106084905.18622-2-fourier.thomas@gmail.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
1 parent 9282a1e commit bb97131

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • drivers/net/wireless/ath/ath12k

drivers/net/wireless/ath/ath12k/ce.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -984,8 +984,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab)
984984
dma_free_coherent(ab->dev,
985985
pipe->src_ring->nentries * desc_sz +
986986
CE_DESC_RING_ALIGN,
987-
pipe->src_ring->base_addr_owner_space,
988-
pipe->src_ring->base_addr_ce_space);
987+
pipe->src_ring->base_addr_owner_space_unaligned,
988+
pipe->src_ring->base_addr_ce_space_unaligned);
989989
kfree(pipe->src_ring);
990990
pipe->src_ring = NULL;
991991
}
@@ -995,8 +995,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab)
995995
dma_free_coherent(ab->dev,
996996
pipe->dest_ring->nentries * desc_sz +
997997
CE_DESC_RING_ALIGN,
998-
pipe->dest_ring->base_addr_owner_space,
999-
pipe->dest_ring->base_addr_ce_space);
998+
pipe->dest_ring->base_addr_owner_space_unaligned,
999+
pipe->dest_ring->base_addr_ce_space_unaligned);
10001000
kfree(pipe->dest_ring);
10011001
pipe->dest_ring = NULL;
10021002
}
@@ -1007,8 +1007,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab)
10071007
dma_free_coherent(ab->dev,
10081008
pipe->status_ring->nentries * desc_sz +
10091009
CE_DESC_RING_ALIGN,
1010-
pipe->status_ring->base_addr_owner_space,
1011-
pipe->status_ring->base_addr_ce_space);
1010+
pipe->status_ring->base_addr_owner_space_unaligned,
1011+
pipe->status_ring->base_addr_ce_space_unaligned);
10121012
kfree(pipe->status_ring);
10131013
pipe->status_ring = NULL;
10141014
}

0 commit comments

Comments
 (0)