Subject: Re: [PATCH v2 09/15] wcn36xx: Parse trigger_ba response properly

From: Sergei Shtylyov <[email-masked]>
Date: Mon, 4 Apr 2016 15:24:36 +0300

Hello.

On 4/4/2016 1:16 AM, Bjorn Andersson wrote:

> From: Pontus Fuchs <[email-masked]>
>
> This message does not follow the canonical format and needs it's own
> parser.
>
> Signed-off-by: Pontus Fuchs <[email-masked]>
> Signed-off-by: Bjorn Andersson <[email-masked]>
> ---
>   drivers/net/wireless/ath/wcn36xx/smd.c | 14 ++++++++++++--
>   1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
> index 76c6856ed932..7f315d098f52 100644
> --- a/drivers/net/wireless/ath/wcn36xx/smd.c
> +++ b/drivers/net/wireless/ath/wcn36xx/smd.c
> @@ -1968,6 +1968,17 @@ out:
>   	return ret;
>   }
>
> +static int wcn36xx_smd_trigger_ba_rsp(void *buf, int len)
> +{
> +	struct wcn36xx_hal_trigger_ba_rsp_msg *rsp;
> +
> +	if (len < sizeof(*rsp))
> +		return -EINVAL;
> +
> +	rsp = (struct wcn36xx_hal_trigger_ba_rsp_msg *) buf;

    Casts from 'void *' to other pointer types are automatic, no need for the 
explicit cast.

[...]

MBR, Sergei