2023-03-17 16:21:59

by Manish Dharanenthiran

[permalink] [raw]
Subject: [PATCH] wifi: ath12k: fill peer meta data during reo_reinject

From: P Praneesh <[email protected]>

Firmware expects physical address in the reo entrance ring when MLO is
enabled and peer meta data in the queue_addr_lo for the non MLO cases.
Current implementation fills the physical address for the non MLO cases
and firmware decodes it differently which leads to SOC CSR region
access which is not related to firmware/MAC operation.

Fix this by sending only peer_meta data and destination indication bit
during non MLO case. This prevents firmware from invalid decoding.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1

Signed-off-by: P Praneesh <[email protected]>
Signed-off-by: Manish Dharanenthiran <[email protected]>
---
drivers/net/wireless/ath/ath12k/dp_rx.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index 0adcbcfa0db5..b368494071ea 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -3047,10 +3047,14 @@ static int ath12k_dp_rx_h_defrag_reo_reinject(struct ath12k *ar,
reo_ent_ring->rx_mpdu_info.peer_meta_data =
reo_dest_ring->rx_mpdu_info.peer_meta_data;

- reo_ent_ring->queue_addr_lo = cpu_to_le32(lower_32_bits(rx_tid->paddr));
- reo_ent_ring->info0 = le32_encode_bits(upper_32_bits(rx_tid->paddr),
- HAL_REO_ENTR_RING_INFO0_QUEUE_ADDR_HI) |
- le32_encode_bits(dst_ind, HAL_REO_ENTR_RING_INFO0_DEST_IND);
+ /* Firmware expects physical address to be filled in queue_addr_lo in
+ * the MLO scenario and in case of non MLO peer meta data needs to be
+ * filled.
+ * TODO: Need to handle for MLO scenario.
+ */
+ reo_ent_ring->queue_addr_lo = reo_dest_ring->rx_mpdu_info.peer_meta_data;
+ reo_ent_ring->info0 = le32_encode_bits(dst_ind,
+ HAL_REO_ENTR_RING_INFO0_DEST_IND);

reo_ent_ring->info1 = le32_encode_bits(rx_tid->cur_sn,
HAL_REO_ENTR_RING_INFO1_MPDU_SEQ_NUM);

base-commit: 3df3715e556027e94246b2cb30986563362a65f4
--
2.17.1



2023-03-24 14:52:33

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath12k: fill peer meta data during reo_reinject

Manish Dharanenthiran <[email protected]> wrote:

> Firmware expects physical address in the reo entrance ring when MLO is
> enabled and peer meta data in the queue_addr_lo for the non MLO cases.
> Current implementation fills the physical address for the non MLO cases
> and firmware decodes it differently which leads to SOC CSR region
> access which is not related to firmware/MAC operation.
>
> Fix this by sending only peer_meta data and destination indication bit
> during non MLO case. This prevents firmware from invalid decoding.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: P Praneesh <[email protected]>
> Signed-off-by: Manish Dharanenthiran <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>

Patch applied to ath-next branch of ath.git, thanks.

4b50d4205207 wifi: ath12k: fill peer meta data during reo_reinject

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches