From: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
To: Miaoqing Pan <miaoqing.pan@oss.qualcomm.com>, jjohnson@kernel.org
Cc: ath12k@lists.infradead.org, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH ath-next 3/5] wifi: ath12k: add HAL ops for monitor TLV header decode and alignment
Date: Thu, 18 Jun 2026 14:43:26 +0530 [thread overview]
Message-ID: <aa5e214f-2d9e-4c97-b45f-7181c81cf023@oss.qualcomm.com> (raw)
In-Reply-To: <20260509025819.1641630-4-miaoqing.pan@oss.qualcomm.com>
On 5/9/2026 8:28 AM, Miaoqing Pan wrote:
> Wi-Fi 7 monitor RX status TLV parsing needs to decode TLV headers and
> advance the pointer with the correct header alignment. Different targets
> use different TLV header layouts (32-bit vs 64-bit), but the HAL ops for
> dp_mon RX status header decode and header alignment were not populated
> for all wifi7 targets.
>
> Add dp_mon RX status TLV header decode callbacks and TLV header alignment
> helpers to the wifi7 HAL ops for QCC2072, QCN9274 and WCN7850. Export
> helpers to query the required TLV header alignment for 32-bit and 64-bit
> TLV headers so the caller can align the TLV walk correctly across targets.
>
> Tested-on: QCC2072 hw1.0 PCI WLAN.COL.1.0.c2-00068-QCACOLSWPL_V1_TO_SILICONZ-1
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3
>
> Signed-off-by: Miaoqing Pan <miaoqing.pan@oss.qualcomm.com>
> ---
> drivers/net/wireless/ath/ath12k/hal.c | 12 ++++++++++++
> drivers/net/wireless/ath/ath12k/hal.h | 4 ++++
> drivers/net/wireless/ath/ath12k/wifi7/hal_qcc2072.c | 2 ++
> drivers/net/wireless/ath/ath12k/wifi7/hal_qcn9274.c | 2 ++
> drivers/net/wireless/ath/ath12k/wifi7/hal_wcn7850.c | 2 ++
> 5 files changed, 22 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath12k/hal.c b/drivers/net/wireless/ath/ath12k/hal.c
> index d940f83cd92f..c0c3d2f047ef 100644
> --- a/drivers/net/wireless/ath/ath12k/hal.c
> +++ b/drivers/net/wireless/ath/ath12k/hal.c
> @@ -875,3 +875,15 @@ void *ath12k_hal_decode_tlv32_hdr(void *tlv, u16 *tag, u16 *len, u16 *usrid)
> return tlv32->value;
> }
> EXPORT_SYMBOL(ath12k_hal_decode_tlv32_hdr);
> +
> +u32 ath12k_hal_get_tlv64_hdr_align(void)
> +{
> + return HAL_TLV_64_ALIGN;
> +}
> +EXPORT_SYMBOL(ath12k_hal_get_tlv64_hdr_align);
> +
> +u32 ath12k_hal_get_tlv32_hdr_align(void)
> +{
> + return HAL_TLV_ALIGN;
> +}
> +EXPORT_SYMBOL(ath12k_hal_get_tlv32_hdr_align);
> diff --git a/drivers/net/wireless/ath/ath12k/hal.h b/drivers/net/wireless/ath/ath12k/hal.h
> index 3158c1881c76..312993d3d5d4 100644
> --- a/drivers/net/wireless/ath/ath12k/hal.h
> +++ b/drivers/net/wireless/ath/ath12k/hal.h
> @@ -1439,6 +1439,8 @@ struct hal_ops {
> u8 *rbm, u32 *msdu_cnt);
> void *(*reo_cmd_enc_tlv_hdr)(void *tlv, u64 tag, u64 len);
> u16 (*reo_status_dec_tlv_hdr)(void *tlv, void **desc);
> + void *(*mon_rx_status_dec_tlv_hdr)(void *tlv, u16 *tag, u16 *len, u16 *usrid);
> + u32 (*get_tlv_hdr_align)(void);
> };
>
> #define HAL_TLV_HDR_TAG GENMASK(9, 1)
> @@ -1553,4 +1555,6 @@ void *ath12k_hal_encode_tlv64_hdr(void *tlv, u64 tag, u64 len);
> void *ath12k_hal_encode_tlv32_hdr(void *tlv, u64 tag, u64 len);
> void *ath12k_hal_decode_tlv64_hdr(void *tlv, u16 *tag, u16 *len, u16 *usrid);
> void *ath12k_hal_decode_tlv32_hdr(void *tlv, u16 *tag, u16 *len, u16 *usrid);
> +u32 ath12k_hal_get_tlv64_hdr_align(void);
> +u32 ath12k_hal_get_tlv32_hdr_align(void);
> #endif
> diff --git a/drivers/net/wireless/ath/ath12k/wifi7/hal_qcc2072.c b/drivers/net/wireless/ath/ath12k/wifi7/hal_qcc2072.c
> index c0583c3a2191..80ffadc47d48 100644
> --- a/drivers/net/wireless/ath/ath12k/wifi7/hal_qcc2072.c
> +++ b/drivers/net/wireless/ath/ath12k/wifi7/hal_qcc2072.c
> @@ -490,6 +490,8 @@ const struct hal_ops hal_qcc2072_ops = {
> .rx_reo_ent_buf_paddr_get = ath12k_wifi7_hal_rx_reo_ent_buf_paddr_get,
> .reo_cmd_enc_tlv_hdr = ath12k_hal_encode_tlv32_hdr,
> .reo_status_dec_tlv_hdr = ath12k_hal_reo_status_dec_tlv_hdr_qcc2072,
> + .mon_rx_status_dec_tlv_hdr = ath12k_hal_decode_tlv32_hdr,
> + .get_tlv_hdr_align = ath12k_hal_get_tlv32_hdr_align,
ops get_tlv_hdr_align() seems unused, may be patch 4/5 is supposed to
used this ops instead of removing the alignment?
Vasanth
next prev parent reply other threads:[~2026-06-18 9:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-09 2:58 [PATCH ath-next 0/5] wifi: ath12k: fix dp_mon RX parsing for 32-bit TLV Miaoqing Pan
2026-05-09 2:58 ` [PATCH ath-next 1/5] wifi: ath12k: fix TLV32 length mask Miaoqing Pan
2026-05-09 2:58 ` [PATCH ath-next 2/5] wifi: ath12k: refactor HAL TLV32/64 decode helpers Miaoqing Pan
2026-05-09 2:58 ` [PATCH ath-next 3/5] wifi: ath12k: add HAL ops for monitor TLV header decode and alignment Miaoqing Pan
2026-06-18 9:13 ` Vasanthakumar Thiagarajan [this message]
2026-06-18 9:19 ` Miaoqing Pan
2026-06-18 9:22 ` Vasanthakumar Thiagarajan
2026-05-09 2:58 ` [PATCH ath-next 4/5] wifi: ath12k: add dp_mon support 32-bit TLV headers Miaoqing Pan
2026-05-09 2:58 ` [PATCH ath-next 5/5] wifi: ath12k: tighten RX monitor TLV bounds check Miaoqing Pan
2026-06-17 8:57 ` [PATCH ath-next 0/5] wifi: ath12k: fix dp_mon RX parsing for 32-bit TLV Baochen Qiang
2026-06-18 9:23 ` Vasanthakumar Thiagarajan
2026-06-30 21:26 ` 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=aa5e214f-2d9e-4c97-b45f-7181c81cf023@oss.qualcomm.com \
--to=vasanthakumar.thiagarajan@oss.qualcomm.com \
--cc=ath12k@lists.infradead.org \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=miaoqing.pan@oss.qualcomm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®