From patchwork Fri Dec 19 06:54:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 5517941 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 92E4DBEEA8 for ; Fri, 19 Dec 2014 08:07:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B1CC320123 for ; Fri, 19 Dec 2014 08:07:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9BFF12012D for ; Fri, 19 Dec 2014 08:07:51 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y1sbA-00020V-In; Fri, 19 Dec 2014 08:07:44 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y1sb8-000205-Jf for ath10k@bombadil.infradead.org; Fri, 19 Dec 2014 08:07:42 +0000 Received: from sabertooth02.qualcomm.com ([65.197.215.38]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y1rTh-00014J-14 for ath10k@lists.infradead.org; Fri, 19 Dec 2014 06:55:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1418972156; x=1450508156; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=oXjnj+4mbx37A35zGWu6G+NEkOmPuemwiKLBoC1CBEA=; b=oiVEqkQSSjGV7s8Z9BCbg3ixgTb1HeMrwAXfsKp4HzkhgrZUtjaw9DG6 /N6NFN4HU4gyu0vX9A+AWK5Ld2kOq4ui5m9tNBhRdurHFGsym12+FPAgV 4BqJjD1fut4LhRRVmzwcRViBm1zOn5bPgoPxWYluxq1/IEcNY1GHW1Gbv w=; X-IronPort-AV: E=McAfee;i="5600,1067,7656"; a="81043032" Received: from unknown (HELO ironmsg01-lv.qualcomm.com) ([10.47.202.180]) by sabertooth02.qualcomm.com with ESMTP; 18 Dec 2014 22:55:33 -0800 X-IronPort-AV: E=Sophos;i="5.07,605,1413270000"; d="scan'208";a="31985884" Received: from nasanexhc03.na.qualcomm.com ([10.46.200.142]) by ironmsg01-lv.qualcomm.com with ESMTP/TLS/RC4-SHA; 18 Dec 2014 22:55:33 -0800 Received: from aphydexm01b.ap.qualcomm.com (10.222.112.203) by NASANEXHC03.na.qualcomm.com (10.46.200.142) with Microsoft SMTP Server (TLS) id 14.3.181.6; Thu, 18 Dec 2014 22:55:32 -0800 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01b.ap.qualcomm.com (10.222.112.203) with Microsoft SMTP Server (TLS) id 15.0.913.22; Thu, 18 Dec 2014 22:55:24 -0800 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Fri, 19 Dec 2014 12:25:15 +0530 From: Rajkumar Manoharan To: Subject: [PATCH 1/8] ath10k: add wmi support for addba_clear_resp Date: Fri, 19 Dec 2014 12:24:52 +0530 Message-ID: <1418972099-5296-2-git-send-email-rmanohar@qti.qualcomm.com> X-Mailer: git-send-email 2.2.0 In-Reply-To: <1418972099-5296-1-git-send-email-rmanohar@qti.qualcomm.com> References: <1418972099-5296-1-git-send-email-rmanohar@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01G.na.qualcomm.com (10.85.0.33) To aphydexm01b.ap.qualcomm.com (10.222.112.203) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141219_015557_327670_58C0D66D X-CRM114-Status: GOOD ( 11.59 ) X-Spam-Score: -7.0 (-------) Cc: linux-wireless@vger.kernel.org, Rajkumar Manoharan X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Add WMI support for clearing addba response before switching aggregation mode (auto/manual) for debugging purpose. Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/wmi-ops.h | 18 ++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi-tlv.c | 1 + drivers/net/wireless/ath/ath10k/wmi.c | 27 +++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h index 20e2c30..b161043 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-ops.h +++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h @@ -119,6 +119,8 @@ struct wmi_ops { u32 next_offset, u32 enabled); struct sk_buff *(*gen_pdev_get_temperature)(struct ath10k *ar); + struct sk_buff *(*gen_addba_clear_resp)(struct ath10k *ar, u32 vdev_id, + const u8 *mac); }; int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id); @@ -857,4 +859,20 @@ ath10k_wmi_pdev_get_temperature(struct ath10k *ar) ar->wmi.cmd->pdev_get_temperature_cmdid); } +static inline int +ath10k_wmi_addba_clear_resp(struct ath10k *ar, u32 vdev_id, const u8 *mac) +{ + struct sk_buff *skb; + + if (!ar->wmi.ops->gen_addba_clear_resp) + return -EOPNOTSUPP; + + skb = ar->wmi.ops->gen_addba_clear_resp(ar, vdev_id, mac); + if (IS_ERR(skb)) + return PTR_ERR(skb); + + return ath10k_wmi_cmd_send(ar, skb, + ar->wmi.cmd->addba_clear_resp_cmdid); +} + #endif diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c index 4c050ce..499a779 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c @@ -2207,6 +2207,7 @@ static const struct wmi_ops wmi_tlv_ops = { .gen_pktlog_disable = ath10k_wmi_tlv_op_gen_pktlog_disable, /* .gen_pdev_set_quiet_mode not implemented */ /* .gen_pdev_get_temperature not implemented */ + /* .gen_addba_clear_resp not implemented */ }; /************/ diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index f6b0de3..0053641 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -4644,6 +4644,30 @@ ath10k_wmi_op_gen_pdev_set_quiet_mode(struct ath10k *ar, u32 period, return skb; } +static struct sk_buff * +ath10k_wmi_op_gen_addba_clear_resp(struct ath10k *ar, u32 vdev_id, + const u8 *mac) +{ + struct wmi_addba_clear_resp_cmd *cmd; + struct sk_buff *skb; + + if (!mac) + return ERR_PTR(-EINVAL); + + skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd)); + if (!skb) + return ERR_PTR(-ENOMEM); + + cmd = (struct wmi_addba_clear_resp_cmd *)skb->data; + cmd->vdev_id = __cpu_to_le32(vdev_id); + ether_addr_copy(cmd->peer_macaddr.addr, mac); + + ath10k_dbg(ar, ATH10K_DBG_WMI, + "wmi addba clear resp vdev_id 0x%X mac_addr %pM\n", + vdev_id, mac); + return skb; +} + static const struct wmi_ops wmi_ops = { .rx = ath10k_wmi_op_rx, .map_svc = wmi_main_svc_map, @@ -4695,6 +4719,7 @@ static const struct wmi_ops wmi_ops = { .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, /* .gen_pdev_get_temperature not implemented */ + .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp, }; static const struct wmi_ops wmi_10_1_ops = { @@ -4749,6 +4774,7 @@ static const struct wmi_ops wmi_10_1_ops = { .gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable, .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, + .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp, }; static const struct wmi_ops wmi_10_2_ops = { @@ -4804,6 +4830,7 @@ static const struct wmi_ops wmi_10_2_ops = { .gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable, .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, + .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp, }; int ath10k_wmi_attach(struct ath10k *ar)