2024-03-01 09:20:24

by Thiraviyam Mariyappan

[permalink] [raw]
Subject: [PATCH] wifi: ath12k: remove reserve member of wbm completion structure

From: Thiraviyam Mariyappan <[email protected]>

In tx completion, status desc obtained from offsetting the address
from wbm ring. Having reserved 8 bytes in status desc offsets the
address twice and read the values from the incorrect address.
So, removing the reserved 8 bytes from wbm completion structure.

Also this patch is applicable for WCN7850.

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

Signed-off-by: Thiraviyam Mariyappan <[email protected]>
---
drivers/net/wireless/ath/ath12k/dp.h | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath12k/dp.h b/drivers/net/wireless/ath/ath12k/dp.h
index eb2dd408e081..d01fc0b0c9a5 100644
--- a/drivers/net/wireless/ath/ath12k/dp.h
+++ b/drivers/net/wireless/ath/ath12k/dp.h
@@ -387,7 +387,6 @@ struct ath12k_dp {
#define HTT_TX_WBM_COMP_INFO2_ACK_RSSI GENMASK(31, 24)

struct htt_tx_wbm_completion {
- __le32 rsvd0[2];
__le32 info0;
__le32 info1;
__le32 info2;
--
2.17.1



2024-03-01 17:02:10

by Jeff Johnson

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath12k: remove reserve member of wbm completion structure

On 3/1/2024 1:19 AM, [email protected] wrote:
> From: Thiraviyam Mariyappan <[email protected]>
>
> In tx completion, status desc obtained from offsetting the address
> from wbm ring. Having reserved 8 bytes in status desc offsets the
> address twice and read the values from the incorrect address.
> So, removing the reserved 8 bytes from wbm completion structure.

Why not instead remove the addition of HTT_TX_WBM_COMP_STATUS_OFFSET in
ath12k_dp_tx_process_htt_tx_complete()?

That would remove an unnecessary operation in the data path.

>
> Also this patch is applicable for WCN7850.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Thiraviyam Mariyappan <[email protected]>
> ---
> drivers/net/wireless/ath/ath12k/dp.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath12k/dp.h b/drivers/net/wireless/ath/ath12k/dp.h
> index eb2dd408e081..d01fc0b0c9a5 100644
> --- a/drivers/net/wireless/ath/ath12k/dp.h
> +++ b/drivers/net/wireless/ath/ath12k/dp.h
> @@ -387,7 +387,6 @@ struct ath12k_dp {
> #define HTT_TX_WBM_COMP_INFO2_ACK_RSSI GENMASK(31, 24)
>
> struct htt_tx_wbm_completion {
> - __le32 rsvd0[2];
> __le32 info0;
> __le32 info1;
> __le32 info2;


Subject: RE: [PATCH] wifi: ath12k: remove reserve member of wbm completion structure


> -----Original Message-----
> From: Jeff Johnson (QUIC) <[email protected]>
> Sent: Friday, March 1, 2024 10:23 PM
> To: Thiraviyam Mariyappan (Temp) (QUIC) <[email protected]>;
> [email protected]
> Cc: [email protected]
> Subject: Re: [PATCH] wifi: ath12k: remove reserve member of wbm
> completion structure
>
> On 3/1/2024 1:19 AM, [email protected] wrote:
> > From: Thiraviyam Mariyappan <[email protected]>
> >
> > In tx completion, status desc obtained from offsetting the address
> > from wbm ring. Having reserved 8 bytes in status desc offsets the
> > address twice and read the values from the incorrect address.
> > So, removing the reserved 8 bytes from wbm completion structure.
>
> Why not instead remove the addition of
> HTT_TX_WBM_COMP_STATUS_OFFSET in
> ath12k_dp_tx_process_htt_tx_complete()?
Similar to ath11k, removed this member from the structure. Will check and address in next patch version.
>
> That would remove an unnecessary operation in the data path.
>
> >
> > Also this patch is applicable for WCN7850.
> >
> > Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-
> QCAHKSWPL_SILICONZ-1
> >
> > Signed-off-by: Thiraviyam Mariyappan <[email protected]>
> > ---
> > drivers/net/wireless/ath/ath12k/dp.h | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/net/wireless/ath/ath12k/dp.h
> > b/drivers/net/wireless/ath/ath12k/dp.h
> > index eb2dd408e081..d01fc0b0c9a5 100644
> > --- a/drivers/net/wireless/ath/ath12k/dp.h
> > +++ b/drivers/net/wireless/ath/ath12k/dp.h
> > @@ -387,7 +387,6 @@ struct ath12k_dp {
> > #define HTT_TX_WBM_COMP_INFO2_ACK_RSSI
> GENMASK(31, 24)
> >
> > struct htt_tx_wbm_completion {
> > - __le32 rsvd0[2];
> > __le32 info0;
> > __le32 info1;
> > __le32 info2;