Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1370298 > unrolled thread
| Started by | Bjorn Andersson <bjorn.andersson@linaro.org> |
|---|---|
| First post | 2016-04-04 00:20 +0200 |
| Last post | 2016-04-04 14:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 09/15] wcn36xx: Parse trigger_ba response properly Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-04-04 00:20 +0200
Re: [PATCH v2 09/15] wcn36xx: Parse trigger_ba response properly Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-04-04 14:30 +0200
| From | Bjorn Andersson <bjorn.andersson@linaro.org> |
|---|---|
| Date | 2016-04-04 00:20 +0200 |
| Subject | [PATCH v2 09/15] wcn36xx: Parse trigger_ba response properly |
| Message-ID | <rjYxc-1zK-13@gated-at.bofh.it> |
From: Pontus Fuchs <pontus.fuchs@gmail.com>
This message does not follow the canonical format and needs it's own
parser.
Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
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;
+ return rsp->status;
+}
+
int wcn36xx_smd_trigger_ba(struct wcn36xx *wcn, u8 sta_index)
{
struct wcn36xx_hal_trigger_ba_req_msg msg_body;
@@ -1992,8 +2003,7 @@ int wcn36xx_smd_trigger_ba(struct wcn36xx *wcn, u8 sta_index)
wcn36xx_err("Sending hal_trigger_ba failed\n");
goto out;
}
- ret = wcn36xx_smd_rsp_status_check_v2(wcn, wcn->hal_buf,
- wcn->hal_rsp_len);
+ ret = wcn36xx_smd_trigger_ba_rsp(wcn->hal_buf, wcn->hal_rsp_len);
if (ret) {
wcn36xx_err("hal_trigger_ba response failed err=%d\n", ret);
goto out;
--
2.5.0
[toc] | [next] | [standalone]
| From | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
|---|---|
| Date | 2016-04-04 14:30 +0200 |
| Message-ID | <rkbNM-2XI-31@gated-at.bofh.it> |
| In reply to | #1370298 |
Hello.
On 4/4/2016 1:16 AM, Bjorn Andersson wrote:
> From: Pontus Fuchs <pontus.fuchs@gmail.com>
>
> This message does not follow the canonical format and needs it's own
> parser.
>
> Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> 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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web