From patchwork Mon Mar 30 18:14:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yanbo Li X-Patchwork-Id: 6123331 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4944BBF4A7 for ; Mon, 30 Mar 2015 18:15:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6492B202B8 for ; Mon, 30 Mar 2015 18:15:29 +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 60BAD2015E for ; Mon, 30 Mar 2015 18:15:28 +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 1YceDa-00020e-Lh; Mon, 30 Mar 2015 18:15:22 +0000 Received: from sabertooth02.qualcomm.com ([65.197.215.38]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YceDY-0000lq-FD for ath10k@lists.infradead.org; Mon, 30 Mar 2015 18:15:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1427739320; x=1459275320; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=2ZrPlIWYFwgEbqqw7cHY1vcour3PdikFdZAb3lo3buE=; b=TgsNJq1soNu7O9WbjN81f4pe/p9IscD2hYvEJA8HhYWU+QkZEEqe9BmH 1hiIS7SaMmDjFuU7MYaYITRGmHIGWAHSTfEpQCNVd41+gDTf2P7yl0TtI 31bsVQUQKXWPm7awwZxjwS4aLlydYWgr5qQzNqZsXMCmifENhaPGCG+c/ E=; X-IronPort-AV: E=McAfee;i="5700,7163,7756"; a="86907804" Received: from ironmsg03-r.qualcomm.com ([172.30.46.17]) by sabertooth02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 30 Mar 2015 11:14:57 -0700 X-IronPort-AV: E=Sophos;i="5.11,495,1422950400"; d="scan'208";a="883437823" Received: from nasanexm02e.na.qualcomm.com ([10.85.0.86]) by Ironmsg03-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 30 Mar 2015 11:14:56 -0700 Received: from buildX11.qca.qualcomm.com (10.80.80.8) by nasanexm02e.na.qualcomm.com (10.85.0.86) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Mon, 30 Mar 2015 11:14:56 -0700 From: Yanbo Li To: Subject: [PATCH 2/2] ath10k: Enable the BT-coex feature Date: Mon, 30 Mar 2015 11:14:06 -0700 Message-ID: <1427739246-2734-2-git-send-email-yanbol@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427739246-2734-1-git-send-email-yanbol@qca.qualcomm.com> References: <1427739246-2734-1-git-send-email-yanbol@qca.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01F.na.qualcomm.com (10.85.0.32) To nasanexm02e.na.qualcomm.com (10.85.0.86) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150330_111520_679251_79E0A192 X-CRM114-Status: UNSURE ( 6.54 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.1 (-----) Cc: dreamfly281@gmail.com, linux-wireless@vger.kernel.org, michal.kazior@tieto.com, ath10k@lists.infradead.org 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 The new 10.2.4 FW support the BT-coex feature with external BT module, The external BT modules can communicate with it via the GPIO. This patch check the BT-coex capability of the FW and enable it by default. Signed-off-by: Yanbo Li diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 54430a1a3f73..bff55188af9b 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -3960,6 +3960,8 @@ static struct sk_buff *ath10k_wmi_10_2_op_gen_init(struct ath10k *ar) cmd = (struct wmi_init_cmd_10_2 *)buf->data; features = WMI_10_2_RX_BATCH_MODE; + if (test_bit(WMI_SERVICE_COEX_GPIO, ar->wmi.svc_map)) + features |= WMI_10_2_COEX_GPIO; cmd->resource_config.feature_mask = __cpu_to_le32(features); memcpy(&cmd->resource_config.common, &config, sizeof(config)); diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index a8f39d69eee2..b570dd391efa 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -149,6 +149,7 @@ enum wmi_service { WMI_SERVICE_MDNS_OFFLOAD, WMI_SERVICE_SAP_AUTH_OFFLOAD, WMI_SERVICE_ATF, + WMI_SERVICE_COEX_GPIO, /* keep last */ WMI_SERVICE_MAX, @@ -179,6 +180,7 @@ enum wmi_10x_service { WMI_10X_SERVICE_FORCE_FW_HANG, WMI_10X_SERVICE_SMART_ANTENNA_HW_SUPPORT, WMI_10X_SERVICE_ATF, + WMI_10X_SERVICE_COEX_GPIO, }; enum wmi_main_service { @@ -296,6 +298,7 @@ static inline char *wmi_service_name(int service_id) SVCSTR(WMI_SERVICE_MDNS_OFFLOAD); SVCSTR(WMI_SERVICE_SAP_AUTH_OFFLOAD); SVCSTR(WMI_SERVICE_ATF); + SVCSTR(WMI_SERVICE_COEX_GPIO); default: return NULL; } @@ -361,6 +364,8 @@ static inline void wmi_10x_svc_map(const __le32 *in, unsigned long *out, WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT, len); SVCMAP(WMI_10X_SERVICE_ATF, WMI_SERVICE_ATF, len); + SVCMAP(WMI_10X_SERVICE_COEX_GPIO, + WMI_SERVICE_COEX_GPIO, len); } static inline void wmi_main_svc_map(const __le32 *in, unsigned long *out, @@ -1957,6 +1962,7 @@ struct wmi_resource_config_10x { enum wmi_10_2_feature_mask { WMI_10_2_RX_BATCH_MODE = BIT(0), WMI_10_2_ATF_CONFIG = BIT(1), + WMI_10_2_COEX_GPIO = BIT(3), }; struct wmi_resource_config_10_2 {