diff mbox

[v1,3/3] ath10k: Enable parsing per station rx duration for 10.4

Message ID 8737rhfiy7.fsf@kamboji.qca.qualcomm.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Kalle Valo March 23, 2016, 1 p.m. UTC
Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com> writes:

> From: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
>
> Rx duration support for per station is part of extended peer
> stats, enable provision to parse the same and provide backward
> compatibility based on the 'stats_id' event
>
> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>

There was a new sparse warning:

drivers/net/wireless/ath/ath10k/wmi.c:2978:42: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath10k/wmi.c:2978:42:    expected unsigned int [unsigned] [usertype] rx_duration
drivers/net/wireless/ath/ath10k/wmi.c:2978:42:    got restricted __le32 const [usertype] rx_duration

I fixed it like this in the pending branch, please double check:

Comments

Mohammed Shafi Shajakhan March 23, 2016, 1:03 p.m. UTC | #1
Hi Kalle,

On Wed, Mar 23, 2016 at 01:00:01PM +0000, Valo, Kalle wrote:
> Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com> writes:
> 
> > From: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
> >
> > Rx duration support for per station is part of extended peer
> > stats, enable provision to parse the same and provide backward
> > compatibility based on the 'stats_id' event
> >
> > Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
> 
> There was a new sparse warning:
> 
> drivers/net/wireless/ath/ath10k/wmi.c:2978:42: warning: incorrect type in assignment (different base types)
> drivers/net/wireless/ath/ath10k/wmi.c:2978:42:    expected unsigned int [unsigned] [usertype] rx_duration
> drivers/net/wireless/ath/ath10k/wmi.c:2978:42:    got restricted __le32 const [usertype] rx_duration
> 
> I fixed it like this in the pending branch, please double check:

[shafi] thanks for fixing this, sorry i missed this.

> 
> --- a/drivers/net/wireless/ath/ath10k/wmi.c
> +++ b/drivers/net/wireless/ath/ath10k/wmi.c
> @@ -2975,7 +2975,7 @@ static int ath10k_wmi_10_4_op_pull_fw_stats(struct ath10k *ar,
>                 ath10k_wmi_10_4_pull_peer_stats(&src->common, dst);
>                 /* FIXME: expose 10.4 specific values */
>                 if (extd_peer_stats)
> -                       dst->rx_duration = src->rx_duration;
> +                       dst->rx_duration = __le32_to_cpu(src->rx_duration);
>  
>                 list_add_tail(&dst->list, &stats->peers);
>         }
>
regards,
shafi
Mohammed Shafi Shajakhan March 23, 2016, 1:08 p.m. UTC | #2
Hi Kalle,

I will make sure, I will run sparse before sending it for review
http://linuxwireless.org/en/users/Drivers/ath10k/CodingStyle/#Linux_style

make drivers/net/wireless/ath/ath10k/ C=2 CF="-D__CHECK_ENDIAN__"

regret the inconvenience so caused  (including the compilation error)

regards,
shafi

-----Original Message-----
From: Mohammed Shafi Shajakhan [mailto:mohammed@codeaurora.org] 
Sent: Wednesday, March 23, 2016 6:34 PM
To: Valo, Kalle <kvalo@qca.qualcomm.com>
Cc: Shajakhan, Mohammed Shafi (Mohammed Shafi) <mohammed@qti.qualcomm.com>; ath10k@lists.infradead.org; linux-wireless@vger.kernel.org
Subject: Re: [PATCH v1 3/3] ath10k: Enable parsing per station rx duration for 10.4

Hi Kalle,

On Wed, Mar 23, 2016 at 01:00:01PM +0000, Valo, Kalle wrote:
> Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com> writes:
> 
> > From: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
> >
> > Rx duration support for per station is part of extended peer stats, 
> > enable provision to parse the same and provide backward 
> > compatibility based on the 'stats_id' event
> >
> > Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
> 
> There was a new sparse warning:
> 
> drivers/net/wireless/ath/ath10k/wmi.c:2978:42: warning: incorrect type in assignment (different base types)
> drivers/net/wireless/ath/ath10k/wmi.c:2978:42:    expected unsigned int [unsigned] [usertype] rx_duration
> drivers/net/wireless/ath/ath10k/wmi.c:2978:42:    got restricted __le32 const [usertype] rx_duration
> 
> I fixed it like this in the pending branch, please double check:

[shafi] thanks for fixing this, sorry i missed this.

> 
> --- a/drivers/net/wireless/ath/ath10k/wmi.c
> +++ b/drivers/net/wireless/ath/ath10k/wmi.c
> @@ -2975,7 +2975,7 @@ static int ath10k_wmi_10_4_op_pull_fw_stats(struct ath10k *ar,
>                 ath10k_wmi_10_4_pull_peer_stats(&src->common, dst);
>                 /* FIXME: expose 10.4 specific values */
>                 if (extd_peer_stats)
> -                       dst->rx_duration = src->rx_duration;
> +                       dst->rx_duration = 
> + __le32_to_cpu(src->rx_duration);
>  
>                 list_add_tail(&dst->list, &stats->peers);
>         }
>
regards,
shafi
Kalle Valo March 24, 2016, 6:51 a.m. UTC | #3
"Shajakhan, Mohammed Shafi (Mohammed Shafi)" <mohammed@qti.qualcomm.com>
writes:
> I will make sure, I will run sparse before sending it for review
> http://linuxwireless.org/en/users/Drivers/ath10k/CodingStyle/#Linux_style
>
> make drivers/net/wireless/ath/ath10k/ C=2 CF="-D__CHECK_ENDIAN__"
>
> regret the inconvenience so caused  (including the compilation error)

I guess easier is to use my ath10k-check script:

https://github.com/qca/qca-swiss-army-knife/blob/master/tools/scripts/ath10k/ath10k-check

I use that script to test every patch before I commit them. Run the
script on the top level kernel source tree and ideally you should not
see any warnings (the output should be empty).
Mohammed Shafi Shajakhan March 24, 2016, 7:01 a.m. UTC | #4
Hi Kalle,

On Thu, Mar 24, 2016 at 06:51:18AM +0000, Valo, Kalle wrote:
> "Shajakhan, Mohammed Shafi (Mohammed Shafi)" <mohammed@qti.qualcomm.com>
> writes:
> > I will make sure, I will run sparse before sending it for review
> > http://linuxwireless.org/en/users/Drivers/ath10k/CodingStyle/#Linux_style
> >
> > make drivers/net/wireless/ath/ath10k/ C=2 CF="-D__CHECK_ENDIAN__"
> >
> > regret the inconvenience so caused  (including the compilation error)
> 
> I guess easier is to use my ath10k-check script:
> 
> https://github.com/qca/qca-swiss-army-knife/blob/master/tools/scripts/ath10k/ath10k-check
> 
> I use that script to test every patch before I commit them. Run the
> script on the top level kernel source tree and ideally you should not
> see any warnings (the output should be empty).
>

[shafi] sure will do that.

regards,
shafi
diff mbox

Patch

--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -2975,7 +2975,7 @@  static int ath10k_wmi_10_4_op_pull_fw_stats(struct ath10k *ar,
                ath10k_wmi_10_4_pull_peer_stats(&src->common, dst);
                /* FIXME: expose 10.4 specific values */
                if (extd_peer_stats)
-                       dst->rx_duration = src->rx_duration;
+                       dst->rx_duration = __le32_to_cpu(src->rx_duration);
 
                list_add_tail(&dst->list, &stats->peers);
        }