summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPontus Fuchs <pontus.fuchs@gmail.com>2016-04-18 22:00:47 -0700
committerKalle Valo <kvalo@qca.qualcomm.com>2016-04-25 20:37:05 +0300
commit16be1ac55944412e8d132b1db26f994b368c5742 (patch)
tree4ed9553f2190945b4108368b4496e37544a4b9cd
parent25a44da26f2901308440a047b27a3a0054ea4a71 (diff)
downloadlinux-16be1ac55944412e8d132b1db26f994b368c5742.tar.gz
linux-16be1ac55944412e8d132b1db26f994b368c5742.tar.bz2
linux-16be1ac55944412e8d132b1db26f994b368c5742.zip
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> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/wcn36xx/smd.c14
1 files 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;