Skip to content

Commit 9282a1e

Browse files
Thomas-fourierjeff-t-johnson
authored andcommitted
wifi: ath10k: 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: 2a1e1ad ("ath10k: Add support for 64 bit ce descriptor") 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/20260105210439.20131-2-fourier.thomas@gmail.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
1 parent a203dbe commit 9282a1e

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

  • drivers/net/wireless/ath/ath10k

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,8 +1727,8 @@ static void _ath10k_ce_free_pipe(struct ath10k *ar, int ce_id)
17271727
(ce_state->src_ring->nentries *
17281728
sizeof(struct ce_desc) +
17291729
CE_DESC_RING_ALIGN),
1730-
ce_state->src_ring->base_addr_owner_space,
1731-
ce_state->src_ring->base_addr_ce_space);
1730+
ce_state->src_ring->base_addr_owner_space_unaligned,
1731+
ce_state->src_ring->base_addr_ce_space_unaligned);
17321732
kfree(ce_state->src_ring);
17331733
}
17341734

@@ -1737,8 +1737,8 @@ static void _ath10k_ce_free_pipe(struct ath10k *ar, int ce_id)
17371737
(ce_state->dest_ring->nentries *
17381738
sizeof(struct ce_desc) +
17391739
CE_DESC_RING_ALIGN),
1740-
ce_state->dest_ring->base_addr_owner_space,
1741-
ce_state->dest_ring->base_addr_ce_space);
1740+
ce_state->dest_ring->base_addr_owner_space_unaligned,
1741+
ce_state->dest_ring->base_addr_ce_space_unaligned);
17421742
kfree(ce_state->dest_ring);
17431743
}
17441744

@@ -1758,8 +1758,8 @@ static void _ath10k_ce_free_pipe_64(struct ath10k *ar, int ce_id)
17581758
(ce_state->src_ring->nentries *
17591759
sizeof(struct ce_desc_64) +
17601760
CE_DESC_RING_ALIGN),
1761-
ce_state->src_ring->base_addr_owner_space,
1762-
ce_state->src_ring->base_addr_ce_space);
1761+
ce_state->src_ring->base_addr_owner_space_unaligned,
1762+
ce_state->src_ring->base_addr_ce_space_unaligned);
17631763
kfree(ce_state->src_ring);
17641764
}
17651765

@@ -1768,8 +1768,8 @@ static void _ath10k_ce_free_pipe_64(struct ath10k *ar, int ce_id)
17681768
(ce_state->dest_ring->nentries *
17691769
sizeof(struct ce_desc_64) +
17701770
CE_DESC_RING_ALIGN),
1771-
ce_state->dest_ring->base_addr_owner_space,
1772-
ce_state->dest_ring->base_addr_ce_space);
1771+
ce_state->dest_ring->base_addr_owner_space_unaligned,
1772+
ce_state->dest_ring->base_addr_ce_space_unaligned);
17731773
kfree(ce_state->dest_ring);
17741774
}
17751775

0 commit comments

Comments
 (0)