From patchwork Sun Apr 3 22:16:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 8735271 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7EC91C0554 for ; Sun, 3 Apr 2016 22:20:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A490200FE for ; Sun, 3 Apr 2016 22:20:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BE469201F5 for ; Sun, 3 Apr 2016 22:20:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754644AbcDCWTl (ORCPT ); Sun, 3 Apr 2016 18:19:41 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:34268 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753733AbcDCWQ7 (ORCPT ); Sun, 3 Apr 2016 18:16:59 -0400 Received: by mail-pf0-f173.google.com with SMTP id c20so21524416pfc.1 for ; Sun, 03 Apr 2016 15:16:59 -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=YQJ/XnMEuEQFirnlOzzNIskwwcF1sRni4S63ZuxgD6ImfdIHDx9ZGThqE8xgv0ZrcY d8WYAwMShl1tw8L37XIA1Bi5oEDVl3rk648ZL3TbRVhlYjG83d2FAoTIvtkjoLyBdMy2 ATM2zW/4u9GQ2AdHm5HVSY05mjJIyTiB/Y6UU= 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=Jzx7NpvL1KRtscW8n1ILs6BSuOXEIgQd8VUWr9w4ioN368jmS9YCVWeaIW8k8lyRyc lKWM2+/zsyCtralR2C7LIwiCPo/6rDZslgCCSmrygskw/G1ngjUTfYfUGbHcfQUR1TeJ QkCsg/daZNgEUCzhOqsPZDqpLdvDOYNM2RS9c0cnvf7iqjxJ9ILXdEM0GjFaVX6gewDi hdLv5IHW221iMdghuuOh9b6DXPQFvY3feIN3ZIcwT8llvm05dwzpruAPn2iEdhOqfxf1 xzxRjeJ0XUPprxxTjNJKKoCVDsrvfsZ5CHuBi9ToV0OxadABQlzIbRXG7Cz/+lvF4dMm q99g== X-Gm-Message-State: AD7BkJJPrthrj+Q8Cv0Bqqf9zBgVzSCXtRPa7EIvhea42hbzpJbI2AASJEbRm6J4nWxx1wu5 X-Received: by 10.98.9.219 with SMTP id 88mr16084349pfj.0.1459721818868; Sun, 03 Apr 2016 15:16:58 -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 s64sm34419659pfi.77.2016.04.03.15.16.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 03 Apr 2016 15:16:58 -0700 (PDT) From: Bjorn Andersson To: Eugene Krasnikov , Kalle Valo Cc: Pontus Fuchs , wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 09/15] wcn36xx: Parse trigger_ba response properly Date: Sun, 3 Apr 2016 15:16:40 -0700 Message-Id: <1459721806-11817-9-git-send-email-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1459721806-11817-1-git-send-email-bjorn.andersson@linaro.org> References: <1459721806-11817-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;