]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
wcn36xx: Parse trigger_ba response properly
authorPontus Fuchs <pontus.fuchs@gmail.com>
Wed, 19 Feb 2014 16:15:59 +0000 (17:15 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 14 Mar 2018 02:42:09 +0000 (02:42 +0000)
This message does not follow the canonical format and needs it's own
parser.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
drivers/net/wireless/ath/wcn36xx/smd.c

index 96c72269fc2a6850cbed33a602e1260d409626e0..27ce38640865a7a166516018b0a95ee8977c7690 100644 (file)
@@ -1964,6 +1964,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;
@@ -1988,8 +1999,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;