From: Kang Yang <kang.yang@oss.qualcomm.com>
To: ath12k@lists.infradead.org, kang.yang@oss.qualcomm.com
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH ath-next 08/13] wifi: ath12k: fix macro definition HAL_RX_MSDU_PKT_LENGTH_GET
Date: Mon, 21 Apr 2025 10:34:39 +0800	[thread overview]
Message-ID: <20250421023444.1778-9-kang.yang@oss.qualcomm.com> (raw)
In-Reply-To: <20250421023444.1778-1-kang.yang@oss.qualcomm.com>

Currently, HAL_RX_MSDU_PKT_LENGTH_GET uses u32_get_bits to obtain the
MSDU length from the MSDU description.

This is not right. Because all halphy descriptions are little endian.

So use le32_get_bits for HAL_RX_MSDU_PKT_LENGTH_GET.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1

Signed-off-by: Kang Yang <kang.yang@oss.qualcomm.com>
---
 drivers/net/wireless/ath/ath12k/hal_desc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath12k/hal_desc.h b/drivers/net/wireless/ath/ath12k/hal_desc.h
index 49eededbfa9d..c7a8b26d38a7 100644
--- a/drivers/net/wireless/ath/ath12k/hal_desc.h
+++ b/drivers/net/wireless/ath/ath12k/hal_desc.h
@@ -707,7 +707,7 @@ enum hal_rx_msdu_desc_reo_dest_ind {
 #define RX_MSDU_DESC_INFO0_DECAP_FORMAT		GENMASK(30, 29)
 
 #define HAL_RX_MSDU_PKT_LENGTH_GET(val)		\
-	(u32_get_bits((val), RX_MSDU_DESC_INFO0_MSDU_LENGTH))
+	(le32_get_bits((val), RX_MSDU_DESC_INFO0_MSDU_LENGTH))
 
 struct rx_msdu_desc {
 	__le32 info0;
-- 
2.34.1


  parent reply	other threads:[~2025-04-21  2:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-21  2:34 [PATCH ath-next 00/13] wifi: ath12k: add monitor mode support for WCN7850 Kang Yang
2025-04-21  2:34 ` [PATCH ath-next 01/13] wifi: ath12k: parse msdu_end tlv in ath12k_dp_mon_rx_parse_status_tlv() Kang Yang
2025-04-21  2:34 ` [PATCH ath-next 02/13] wifi: ath12k: avoid call ath12k_dp_mon_parse_rx_dest_tlv() for WCN7850 Kang Yang
2025-04-21  2:34 ` [PATCH ath-next 03/13] wifi: ath12k: add srng config template for mon status ring Kang Yang
2025-04-21  2:34 ` [PATCH ath-next 04/13] wifi: ath12k: add ring config for monitor mode on WCN7850 Kang Yang
2025-04-21  2:34 ` [PATCH ath-next 05/13] wifi: ath12k: add interrupt configuration for mon status ring Kang Yang
2025-04-21  2:34 ` [PATCH ath-next 06/13] wifi: ath12k: add monitor mode handler by monitor status ring interrupt Kang Yang
2025-04-21  2:34 ` [PATCH ath-next 07/13] wifi: ath12k: add support to reap and process monitor status ring Kang Yang
2025-04-21  2:34 ` Kang Yang [this message]
2025-04-21  2:34 ` [PATCH ath-next 09/13] wifi: ath12k: use ath12k_buffer_addr in ath12k_dp_rx_link_desc_return() Kang Yang
2025-04-21  2:34 ` [PATCH ath-next 10/13] wifi: ath12k: add support to reap and process mon dest ring Kang Yang
2025-04-21  2:34 ` [PATCH ath-next 11/13] wifi: ath12k: init monitor parameters for WCN7850 Kang Yang
2025-04-21  2:34 ` [PATCH ath-next 12/13] wifi: ath12k: use different packet offset " Kang Yang
2025-04-21  2:34 ` [PATCH ath-next 13/13] wifi: ath12k: enable monitor mode " Kang Yang
2025-04-28 16:52 ` [PATCH ath-next 00/13] wifi: ath12k: add monitor mode support " Vasanthakumar Thiagarajan
2025-05-16 19:40 ` Jeff Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250421023444.1778-9-kang.yang@oss.qualcomm.com \
    --to=kang.yang@oss.qualcomm.com \
    --cc=ath12k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.