From patchwork Tue Apr 19 05:00:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 66072 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1648070qge; Mon, 18 Apr 2016 22:01:44 -0700 (PDT) X-Received: by 10.98.50.193 with SMTP id y184mr1324867pfy.25.1461042104393; Mon, 18 Apr 2016 22:01:44 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s76si3097301pfa.176.2016.04.18.22.01.44; Mon, 18 Apr 2016 22:01:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752575AbcDSFB0 (ORCPT + 1 other); Tue, 19 Apr 2016 01:01:26 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:35940 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752490AbcDSFBY (ORCPT ); Tue, 19 Apr 2016 01:01:24 -0400 Received: by mail-pa0-f48.google.com with SMTP id er2so2648606pad.3 for ; Mon, 18 Apr 2016 22:01:19 -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=CN4DFc3WDGA1h5NlBYLVhatxUXDD3cqqs9tqOW5Dy7A=; b=FFMKyWCRpmM/O6rucqQGh2gQiHx6u63lLMcqjSTdZqGTcASZ+trZ86cWpUN7Wp7/OG 1HFDqPzvRtXNrpbwC0N4s43SJ4VsCs6NOMkZ5ZRrfCTXhVuHZibp2ny3Z+jcSOfUt0ga L1gYKb+W0qVsWP+QLyI9eXCDAIBKpxFcTLJ2Y= 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=CN4DFc3WDGA1h5NlBYLVhatxUXDD3cqqs9tqOW5Dy7A=; b=eeLaO2EmMsbcz+zkysKfWBtX7Hk3VQm1gm7ZWu/v9i+K+ciGHVD61aPJdEG2pdYJa0 YLlkMm2tYUrfuysDV0ZhcLJZXLskOa5Oms2VvT2Oj+dwnoJv4xqoxIKdqn1vD2DmvMs3 SVGjhIg7rquQFz+eCxVnGkfkCzGKrfIty7uje6JJ8xoiWBRzp+0vcWejQjm60xo4A0/v gP41WMB0ZNV68b5aEcrA1KsYI46EYp1tZUMzbpMiINwdhqnM4lJkiDhn7sDidSju38RG /qjV84KmViLJTd3CGtTalh1vyrCGfgpnC5O1IxYjbBMAhFRLyGL1XnkeXJF+v12ZbsIv D9FQ== X-Gm-Message-State: AOPr4FXoQjV6Dpwg1GKBRYEGNWqNpRidWlqjSX9wWUYl/NesJ+VJos4wYNheESbCd+f8Y7GB X-Received: by 10.66.141.76 with SMTP id rm12mr1393230pab.30.1461042078734; Mon, 18 Apr 2016 22:01:18 -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.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Apr 2016 22:01:18 -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 17/18] wcn36xx: Correct remove bss key response encoding Date: Mon, 18 Apr 2016 22:00:55 -0700 Message-Id: <1461042056-10607-18-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 The WCN36XX_HAL_RMV_BSSKEY_RSP carries a single u32 with "status", so we can use the standard status check function for decoding the result. This is the last user of the v2 status checker, so remove the struct and helper function. Signed-off-by: Bjorn Andersson --- Changes since v2: - Added this patch to the series drivers/net/wireless/ath/wcn36xx/smd.c | 19 +------------------ drivers/net/wireless/ath/wcn36xx/smd.h | 9 --------- 2 files changed, 1 insertion(+), 27 deletions(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index c15501c06eb2..5f6ca3124bd8 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -312,22 +312,6 @@ static int wcn36xx_smd_rsp_status_check(void *buf, size_t len) return 0; } -static int wcn36xx_smd_rsp_status_check_v2(struct wcn36xx *wcn, void *buf, - size_t len) -{ - struct wcn36xx_fw_msg_status_rsp_v2 *rsp; - - if (len < sizeof(struct wcn36xx_hal_msg_header) + sizeof(*rsp)) - return wcn36xx_smd_rsp_status_check(buf, len); - - rsp = buf + sizeof(struct wcn36xx_hal_msg_header); - - if (WCN36XX_FW_MSG_RESULT_SUCCESS != rsp->status) - return rsp->status; - - return 0; -} - int wcn36xx_smd_load_nv(struct wcn36xx *wcn) { struct nv_data *nv_d; @@ -1647,8 +1631,7 @@ int wcn36xx_smd_remove_bsskey(struct wcn36xx *wcn, wcn36xx_err("Sending hal_remove_bsskey failed\n"); goto out; } - ret = wcn36xx_smd_rsp_status_check_v2(wcn, wcn->hal_buf, - wcn->hal_rsp_len); + ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); if (ret) { wcn36xx_err("hal_remove_bsskey response failed err=%d\n", ret); goto out; diff --git a/drivers/net/wireless/ath/wcn36xx/smd.h b/drivers/net/wireless/ath/wcn36xx/smd.h index c1b76d75cf85..d74d781f4c8d 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.h +++ b/drivers/net/wireless/ath/wcn36xx/smd.h @@ -44,15 +44,6 @@ struct wcn36xx_fw_msg_status_rsp { u32 status; } __packed; -/* wcn3620 returns this for tigger_ba */ - -struct wcn36xx_fw_msg_status_rsp_v2 { - u8 bss_id[6]; - u32 status __packed; - u16 count_following_candidates __packed; - /* candidate list follows */ -}; - struct wcn36xx_hal_ind_msg { struct list_head list; u8 *msg;