From patchwork Tue Apr 19 05:00:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 8876771 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 35EE19F1D3 for ; Tue, 19 Apr 2016 05:04:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 675022015A for ; Tue, 19 Apr 2016 05:04:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 860C2200E5 for ; Tue, 19 Apr 2016 05:04:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752780AbcDSFEg (ORCPT ); Tue, 19 Apr 2016 01:04:36 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:35918 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752227AbcDSFBK (ORCPT ); Tue, 19 Apr 2016 01:01:10 -0400 Received: by mail-pa0-f47.google.com with SMTP id er2so2647296pad.3 for ; Mon, 18 Apr 2016 22:01:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6qHVvZMGdoaAT0Uol/oZCwbJz2Bnt2zlhKPisdMlmrI=; b=O4ZkbYP/69Om708RDF4kBrSkU+/nYipgf9KY6/Q3B2TUKcLLKcvYHLQoy7fqLPH5zP gqsZ3kgIUZu0diwCGkbUgdzELyIUQk2oRfMsNUbsaQYUFZkKN2qrVa5b+12ucsMbDj2V HSDXeICJG2YZhYjgFkF7ysh7RtoQsiFSX7cdI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6qHVvZMGdoaAT0Uol/oZCwbJz2Bnt2zlhKPisdMlmrI=; b=efCm+5Y73ZRF0DXaBxX7FMSYPg+bbtvZiWEYStFjzfAYejMzpis6koPIUy/t5TWmwX JYnQAUgEJUwNacl4FHIAir9rAwB86WsM9Cj0UpIg7AINApFECOznDYappsH1KUAP6Fot 9HCszqHuiBkOMZZeXPGP29UTNyn6YFgfwa6vaDCPbu+gcDeOFIFTFDIrTUBhXAlkxfwM HakxIR+tbblcKmuNeVlStcqaXRDuXJxSIaUAV+FcGVPwRRBSRgIjrFg9PXSAWRuiPi/V MJcfEG31nq3umZ6vxPF9CBDPPFyX74KUuJWNwwfz00J32HaHyoWVsfiCJudjkNILTYDz fMyw== X-Gm-Message-State: AOPr4FV1ulbcWa/uNLTUPtAlaf07ekQ/8Q5wGCa4F6n4UIh+rvxP4YjeFaJquQtkd2BEH+Hs X-Received: by 10.66.180.68 with SMTP id dm4mr1349533pac.76.1461042070004; Mon, 18 Apr 2016 22:01:10 -0700 (PDT) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id kh2sm20274686pad.9.2016.04.18.22.01.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Apr 2016 22:01:09 -0700 (PDT) From: Bjorn Andersson To: Eugene Krasnikov , Kalle Valo Cc: Pontus Fuchs , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 09/18] wcn36xx: Parse trigger_ba response properly Date: Mon, 18 Apr 2016 22:00:47 -0700 Message-Id: <1461042056-10607-10-git-send-email-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1461042056-10607-1-git-send-email-bjorn.andersson@linaro.org> References: <1461042056-10607-1-git-send-email-bjorn.andersson@linaro.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Pontus Fuchs This message does not follow the canonical format and needs it's own parser. Signed-off-by: Pontus Fuchs Signed-off-by: Bjorn Andersson --- 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;