From patchwork Tue Mar 29 06:06:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 8682431 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 219209F44D for ; Tue, 29 Mar 2016 06:07:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 44CAC2017D for ; Tue, 29 Mar 2016 06:07:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 311272020F for ; Tue, 29 Mar 2016 06:07:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755994AbcC2GGx (ORCPT ); Tue, 29 Mar 2016 02:06:53 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:33207 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755941AbcC2GGs (ORCPT ); Tue, 29 Mar 2016 02:06:48 -0400 Received: by mail-pf0-f182.google.com with SMTP id 4so6636524pfd.0 for ; Mon, 28 Mar 2016 23:06:47 -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=uZAKWetRMwLJyCc/gCGoYdDIpWdfAF/Wn0pO3C8zu9E=; b=b0jzbtjqp4zZELTIOoW4XFzdAyuq7qsKLr322jdCVMCo0MuxlsJE1f4Gh02nGLjKuk Ro6bfmKcw+cbILwyMGf2NsLzaBK04iUhUpUHQa4X2vGAW2dH48XN1obEmlXG8Wk5xAks bak3f8LUZphubmqJLKoo10qJcqiLZXSE4Mryc= 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=uZAKWetRMwLJyCc/gCGoYdDIpWdfAF/Wn0pO3C8zu9E=; b=Z65HalBuxnLtqwVVASgYXd/KNEcl8mrFuZNZS+78T6qu6JNReO5UkV7nR9s8thUSbH dRbNcAEDD+UgRGnMQti5UdvrcyzN7FVuLi4S6SsS61F1TIEvgD52ieqMVuF6KGwlbfrF mPfUOSAZZ99+na7IvFRD9irzZir9MLJOhLPU1BJ45WKjHDmwowtF0iJ6anDn5IZ3Zd2W pcoi30LUSyYUqoVLN+VgwESWeh7nkSLZWw3+znYIWMmGiT9eoDzL9gBUAk6feXUmpwy6 LplvtgRID3bLFUkchS6guhHGoxdtNnqwVvDQg1ZDSW/iqBLFUVSE4igODj2eH9j4XCHt fP6w== X-Gm-Message-State: AD7BkJLMIhxNJ+0SUf0qjeOLMMjOC/+4plbSINyIvQim65heRg124pLGd0YLEExPzuBkjuiO X-Received: by 10.98.12.8 with SMTP id u8mr748388pfi.36.1459231607455; Mon, 28 Mar 2016 23:06:47 -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 k88sm39878073pfj.0.2016.03.28.23.06.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Mar 2016 23:06:46 -0700 (PDT) From: Bjorn Andersson To: Eugene Krasnikov , Kalle Valo Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Pontus Fuchs Subject: [PATCH 09/16] wcn36xx: Parse trigger_ba response properly Date: Mon, 28 Mar 2016 23:06:26 -0700 Message-Id: <1459231593-360-10-git-send-email-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1459231593-360-1-git-send-email-bjorn.andersson@linaro.org> References: <1459231593-360-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 887781dff110..2b416ee9f105 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1963,6 +1963,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; @@ -1987,8 +1998,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;