public inbox for ath12k@lists.infradead.org
 help / color / mirror / Atom feed
From: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
To: Roopni Devanathan <quic_rdevanat@quicinc.com>,
	ath12k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org,
	Sowmiya Sree Elavalagan <quic_ssreeela@quicinc.com>,
	Ramya Gnanasekar <quic_rgnanase@quicinc.com>
Subject: Re: [PATCH 1/2] wifi: ath12k: Add Support to Parse TPC Event from Firmware
Date: Wed, 8 Jan 2025 16:10:24 -0800	[thread overview]
Message-ID: <9ef1c2ee-beae-423c-8e48-59227b78beee@oss.qualcomm.com> (raw)
In-Reply-To: <20241220203638.2082002-2-quic_rdevanat@quicinc.com>

On 12/20/2024 12:36 PM, Roopni Devanathan wrote:
...
> diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
> index 562b0615ed06..93c4c2344b44 100644
> --- a/drivers/net/wireless/ath/ath12k/wmi.c
> +++ b/drivers/net/wireless/ath/ath12k/wmi.c
> @@ -7404,6 +7404,382 @@ static void ath12k_wmi_event_teardown_complete(struct ath12k_base *ab,
>  	kfree(tb);
>  }
>  
> +static int ath12k_wmi_tpc_stats_copy_buffer(struct ath12k_base *ab,
> +					    const void *ptr, u16 tag, u16 len,
> +					    struct wmi_tpc_stats_info *tpc_stats)
> +{
> +	u32 len1, len2, len3, len4;
> +	s16 *dst_ptr;
> +	s8 *dst_ptr_ctl;
> +
> +	len1 = le32_to_cpu(tpc_stats->max_reg_allowed_power.tpc_reg_pwr.reg_array_len);
> +	len2 = le32_to_cpu(tpc_stats->rates_array1.tpc_rates_array.rate_array_len);
> +	len3 = le32_to_cpu(tpc_stats->rates_array2.tpc_rates_array.rate_array_len);
> +	len4 = le32_to_cpu(tpc_stats->ctl_array.tpc_ctl_pwr.ctl_array_len);
> +
> +	switch (le32_to_cpu(tpc_stats->event_count)) {

drivers/net/wireless/ath/ath12k/wmi.c:7434:17: warning: cast to restricted __le32

note the tpc_stats event_count is defined as u32, not __le32

...

> +static void ath12k_process_tpc_stats(struct ath12k_base *ab,
> +				     struct sk_buff *skb)
> +{
> +	struct ath12k_wmi_pdev_tpc_stats_event_fixed_params *fixed_param;
> +	struct wmi_tpc_stats_info *tpc_stats;
> +	const struct wmi_tlv *tlv;
> +	void *ptr = skb->data;
> +	struct ath12k *ar;
> +	u16 tlv_tag;
> +	u32 event_count;
> +	int ret;
> +

...

> +	}
> +	tpc_stats->pdev_id = fixed_param->pdev_id;
> +	tpc_stats->end_of_event = fixed_param->end_of_event;
> +	tpc_stats->event_count = fixed_param->event_count;

drivers/net/wireless/ath/ath12k/wmi.c:7773:28: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath12k/wmi.c:7773:28:    expected unsigned int [usertype] pdev_id
drivers/net/wireless/ath/ath12k/wmi.c:7773:28:    got restricted __le32 [usertype] pdev_id
drivers/net/wireless/ath/ath12k/wmi.c:7774:33: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath12k/wmi.c:7774:33:    expected unsigned int [usertype] end_of_event
drivers/net/wireless/ath/ath12k/wmi.c:7774:33:    got restricted __le32 [usertype] end_of_event
drivers/net/wireless/ath/ath12k/wmi.c:7775:32: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath12k/wmi.c:7775:32:    expected unsigned int [usertype] event_count
drivers/net/wireless/ath/ath12k/wmi.c:7775:32:    got restricted __le32 [usertype] event_count

These all need le32_to_cpu()

...

> diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
> index b6a197389277..5193f4a7fed1 100644
> --- a/drivers/net/wireless/ath/ath12k/wmi.h
> +++ b/drivers/net/wireless/ath/ath12k/wmi.h

...

> +struct wmi_tpc_stats_info {
> +	u32 pdev_id;
> +	u32 event_count;
> +	u32 end_of_event;
> +	u32 tlvs_rcvd;
> +	struct wmi_max_reg_power_allowed_params max_reg_allowed_power;
> +	struct wmi_tpc_rates_array_params rates_array1;
> +	struct wmi_tpc_rates_array_params rates_array2;
> +	struct wmi_tpc_config_params tpc_config;
> +	struct wmi_tpc_ctl_pwr_table_params ctl_array;
> +};



  parent reply	other threads:[~2025-01-09  0:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-20 20:36 [PATCH 0/2] wifi: ath12k: Support Transmit Power Control Stats Roopni Devanathan
2024-12-20 20:36 ` [PATCH 1/2] wifi: ath12k: Add Support to Parse TPC Event from Firmware Roopni Devanathan
2024-12-21 22:56   ` kernel test robot
2025-01-09  0:10   ` Jeff Johnson [this message]
2024-12-20 20:36 ` [PATCH 2/2] wifi: ath12k: Add Support to Calculate and Display TPC Values Roopni Devanathan

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=9ef1c2ee-beae-423c-8e48-59227b78beee@oss.qualcomm.com \
    --to=jeff.johnson@oss.qualcomm.com \
    --cc=ath12k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_rdevanat@quicinc.com \
    --cc=quic_rgnanase@quicinc.com \
    --cc=quic_ssreeela@quicinc.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