Re: [PATCH 2/2] ath10k: add debugfs support to configure fwtest parameters

2018-03-05 Thread akolli

On 2018-03-05 13:12, Sven Eckelmann wrote:

On Montag, 5. März 2018 12:29:08 CET Anilkumar Kolli wrote:

@@ -496,6 +497,8 @@ struct ath10k_debug {
u32 reg_addr;
u32 nf_cal_period;
void *cal_data;
+   u32 fw_test_param_id;
+   u32 fw_test_param_value;
 };


Why is it necessary to have these two values in ath10k_debug? They seem 
to be

used only in the context of ath10k_write_fw_test().


Yes. it is not reused, will remove this.

Where can we find the documentation of the possible param_id and 
param_values?



All these parameters are for experimentation purpose.

Thanks,
Anil.


___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k


Re: [PATCH 1/2] ath10k: Add WMI FWTEST command support

2018-03-05 Thread Peter Oh

From: Sathishkumar Muruganandam 

This patch adds support for WMI_FWTEST_CMD.
This command is used for setting the wifi parameters.


It's too lack of information in commit message.
You should add such what values are acceptable for which purpose by each 
param_id and param_value to make this changes meaningful to community.


Thanks,
Peter

___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k


Re: [PATCH 1/2] ath10k: Add WMI FWTEST command support

2018-03-05 Thread Sebastian Gottschall

Am 05.03.2018 um 19:48 schrieb Peter Oh:

From: Sathishkumar Muruganandam 

This patch adds support for WMI_FWTEST_CMD.
This command is used for setting the wifi parameters.


It's too lack of information in commit message.
You should add such what values are acceptable for which purpose by 
each param_id and param_value to make this changes meaningful to 
community.
i agree. i reviewed the firmware sourcecode to find out what its doing, 
but also within the firmware is almost undocumented. its a bunch of 
undocumented

numeric parameters with undocumented behaviour.
if qca is willig to document this feature it might be included.

Sebastian


--
Mit freundlichen Grüssen / Regards

Sebastian Gottschall / CTO

NewMedia-NET GmbH - DD-WRT
Firmensitz:  Stubenwaldallee 21a, 64625 Bensheim
Registergericht: Amtsgericht Darmstadt, HRB 25473
Geschäftsführer: Peter Steinhäuser, Christian Scheele
http://www.dd-wrt.com
email: s.gottsch...@dd-wrt.com
Tel.: +496251-582650 / Fax: +496251-5826565


___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k


Re: [PATCH v2] ath10k: fix use-after-free in ath10k_wmi_cmd_send_nowait

2018-03-05 Thread Brian Norris
+ Felix, who had feedback on the last version

On Mon, Mar 05, 2018 at 02:44:02PM +0800, Carl Huang wrote:
> The skb may be freed in tx completion context before
> trace_ath10k_wmi_cmd is called. This can be easily captured when
> KASAN(Kernel Address Sanitizer) is enabled. The fix is to move
> trace_ath10k_wmi_cmd before the send operation. As the ret has no
> meaning in trace_ath10k_wmi_cmd then, so remove this parameter too.
> 
> Signed-off-by: Carl Huang 
> ---
>  drivers/net/wireless/ath/ath10k/trace.h | 12 
>  drivers/net/wireless/ath/ath10k/wmi.c   |  2 +-
>  2 files changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath10k/trace.h 
> b/drivers/net/wireless/ath/ath10k/trace.h
> index e40edce..7d2fac3 100644
> --- a/drivers/net/wireless/ath/ath10k/trace.h
> +++ b/drivers/net/wireless/ath/ath10k/trace.h
> @@ -152,10 +152,9 @@ TRACE_EVENT(ath10k_log_dbg_dump,
>  );
>  
>  TRACE_EVENT(ath10k_wmi_cmd,
> - TP_PROTO(struct ath10k *ar, int id, const void *buf, size_t buf_len,
> -  int ret),
> + TP_PROTO(struct ath10k *ar, int id, const void *buf, size_t buf_len),
>  
> - TP_ARGS(ar, id, buf, buf_len, ret),
> + TP_ARGS(ar, id, buf, buf_len),
>  
>   TP_STRUCT__entry(
>   __string(device, dev_name(ar->dev))
> @@ -163,7 +162,6 @@ TRACE_EVENT(ath10k_wmi_cmd,
>   __field(unsigned int, id)
>   __field(size_t, buf_len)
>   __dynamic_array(u8, buf, buf_len)
> - __field(int, ret)
>   ),
>  
>   TP_fast_assign(
> @@ -171,17 +169,15 @@ TRACE_EVENT(ath10k_wmi_cmd,
>   __assign_str(driver, dev_driver_string(ar->dev));
>   __entry->id = id;
>   __entry->buf_len = buf_len;
> - __entry->ret = ret;
>   memcpy(__get_dynamic_array(buf), buf, buf_len);
>   ),
>  
>   TP_printk(
> - "%s %s id %d len %zu ret %d",
> + "%s %s id %d len %zu",
>   __get_str(driver),
>   __get_str(device),
>   __entry->id,
> - __entry->buf_len,
> - __entry->ret
> + __entry->buf_len
>   )
>  );
>  
> diff --git a/drivers/net/wireless/ath/ath10k/wmi.c 
> b/drivers/net/wireless/ath/ath10k/wmi.c
> index 58dc218..fc9f50d 100644
> --- a/drivers/net/wireless/ath/ath10k/wmi.c
> +++ b/drivers/net/wireless/ath/ath10k/wmi.c
> @@ -1742,8 +1742,8 @@ int ath10k_wmi_cmd_send_nowait(struct ath10k *ar, 
> struct sk_buff *skb,
>   cmd_hdr->cmd_id = __cpu_to_le32(cmd);
>  
>   memset(skb_cb, 0, sizeof(*skb_cb));
> + trace_ath10k_wmi_cmd(ar, cmd_id, skb->data, skb->len);
>   ret = ath10k_htc_send(&ar->htc, ar->wmi.eid, skb);
> - trace_ath10k_wmi_cmd(ar, cmd_id, skb->data, skb->len, ret);
>  
>   if (ret)
>   goto err_pull;

Tested-by: Brian Norris 
Reviewed-by: Brian Norris 

___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k