aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPontus Fuchs <pontus.fuchs@gmail.com>2014-02-19 17:15:59 +0100
committerBjorn Andersson <bjorn.andersson@linaro.org>2016-01-25 18:11:26 -0800
commit527845fe8a3e80b5e8153ef852dcba0a2f6767b7 (patch)
tree4eab5751f5efb989f3b7ae4cdadcd3266869ec1a
parent4a03b978ceef736bb79df8c73d28b2998ff90327 (diff)
wcn36xx: Parse trigger_ba response properly
This message does not follow the canonical format and needs it's own parser. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
-rw-r--r--drivers/net/wireless/ath/wcn36xx/smd.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 59d1a6706aee4..279cdf71a92dd 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1946,6 +1946,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;
@@ -1970,7 +1981,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(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;