From patchwork Mon Dec 11 14:22:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rakesh Pillai X-Patchwork-Id: 10105293 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 81D15602B3 for ; Mon, 11 Dec 2017 14:23:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AEF7A28C01 for ; Mon, 11 Dec 2017 14:23:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3D2128C66; Mon, 11 Dec 2017 14:23:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1489128C01 for ; Mon, 11 Dec 2017 14:23:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=xmiWiQtE3dGOeKr4lAE5ET7xpjVUYm2q3a1cTkcRU7c=; b=Jvnr5JiYDbtyyrYgGLf8Nmc9Zs DUA2brILDTIGjZJKL5S4qy0AhoYTpvuJL1t2G8b1o5iCThZe9Y07VyjcIQMNknud0WDaAKk6DHriB zzFwDqBeANv79csrDYyjTqW7laRJ1/ySzAdtvmFIIRvtw4YouzOHHPIGZvqgE602C1FrNM0l//7ZT BEmbAmySJ9brs+kbRex0udIP30GQpxKUvF4vN6rM7n1ehznXVEgA/DoOTtEqHTzXkDPcYjp3SnXy2 3+gLqdoQkgDiyMQKgmOEaiUHG/oCUmNlXZcGryS59Bpo72eyDqt8mmMTaMLBDWu5rl0d2cwT/9naR bkPmZQMg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eOOzX-0002cb-Dt; Mon, 11 Dec 2017 14:23:35 +0000 Received: from sabertooth01.qualcomm.com ([65.197.215.72]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eOOzS-0002Wh-3r for ath10k@lists.infradead.org; Mon, 11 Dec 2017 14:23:31 +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=1513002210; x=1544538210; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=iklYEQTcTwHTYZetTEH2+7LdEsRunxf+5QTFkh1t6ww=; b=mpDg73AkOm0Jo2LJi/GvVheJ/pWDZ2KUIgYXf8tP0+OBxF7ri84VaGy2 s00qBIDXX8Va3GsnMErpYh1zUaE+dN0SSbObph4iKQYhiRU6+Y8Kqqfuv 8wde/0OSfdL/OWr6YdqajEwf1Tcf51A2/HFaS3y9h8eEnVjsFvFCz1U0X o=; X-IronPort-AV: E=Sophos;i="5.45,391,1508828400"; d="scan'208";a="117583715" Received: from unknown (HELO Ironmsg03-L.qualcomm.com) ([10.53.140.110]) by sabertooth01.qualcomm.com with ESMTP; 11 Dec 2017 06:23:25 -0800 X-IronPort-AV: E=McAfee;i="5900,7806,8741"; a="1502751207" X-MGA-submission: =?us-ascii?q?MDHJ4MiJFpRi7RvSL6VAL5L2MXPpS9qpp2dI93?= =?us-ascii?q?vTB5wbnsTZLfHyJ4l82Pc7wbxth/dl3PsqRH9v+YIu8csgIT5nvISnF8?= =?us-ascii?q?G8KNxpRuEwvyXtC8pI6b0OTPHHCiV9EN9mkZYka8ncrTfNiTIlfKq/Qu?= =?us-ascii?q?SL?= Received: from pillair-linux.qualcomm.com ([10.204.116.193]) by Ironmsg03-L.qualcomm.com with ESMTP; 11 Dec 2017 06:23:24 -0800 Received: by pillair-linux.qualcomm.com (Postfix, from userid 452944) id C6BCA23A5; Mon, 11 Dec 2017 19:53:22 +0530 (IST) From: Rakesh Pillai To: ath10k@lists.infradead.org Subject: [PATCH v3 4/4] ath10k: WMI: add hw params entry for wcn3990 Date: Mon, 11 Dec 2017 19:52:55 +0530 Message-Id: <1513002175-2498-5-git-send-email-pillair@qti.qualcomm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1513002175-2498-1-git-send-email-pillair@qti.qualcomm.com> References: <1513002175-2498-1-git-send-email-pillair@qti.qualcomm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171211_062330_245875_BFCE9569 X-CRM114-Status: UNSURE ( 7.96 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Govind Singh , linux-wireless@vger.kernel.org, Rakesh Pillai MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add hw params entry for wcn3990 and populate various target specific values for wcn3990. Signed-off-by: Rakesh Pillai Signed-off-by: Govind Singh --- drivers/net/wireless/ath/ath10k/core.c | 18 ++++++++++++++++++ drivers/net/wireless/ath/ath10k/hw.c | 2 ++ drivers/net/wireless/ath/ath10k/hw.h | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index be189132623d..6abffb530027 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -405,6 +405,24 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .ast_skid_limit = 0x10, .num_wds_entries = 0x20, }, + { + .id = WCN3990_HW_1_0_DEV_VERSION, + .dev_id = 0, + .name = "wcn3990 hw1.0", + .continuous_frag_desc = true, + .tx_chain_mask = 0x7, + .rx_chain_mask = 0x7, + .max_spatial_stream = 4, + .fw = { + .dir = WCN3990_HW_1_0_FW_DIR, + }, + .sw_decrypt_mcast_mgmt = true, + .hw_ops = &wcn3990_ops, + .decap_align_bytes = 1, + .num_peers = TARGET_HL_10_TLV_NUM_PEERS, + .ast_skid_limit = TARGET_HL_10_TLV_AST_SKID_LIMIT, + .num_wds_entries = TARGET_HL_10_TLV_NUM_WDS_ENTRIES, + }, }; static const char *const ath10k_core_fw_feature_str[] = { diff --git a/drivers/net/wireless/ath/ath10k/hw.c b/drivers/net/wireless/ath/ath10k/hw.c index 88955bbe20bd..c31eea632777 100644 --- a/drivers/net/wireless/ath/ath10k/hw.c +++ b/drivers/net/wireless/ath/ath10k/hw.c @@ -931,3 +931,5 @@ const struct ath10k_hw_ops qca6174_ops = { .set_coverage_class = ath10k_hw_qca988x_set_coverage_class, .enable_pll_clk = ath10k_hw_qca6174_enable_pll_clock, }; + +const struct ath10k_hw_ops wcn3990_ops = {}; diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index fedb6c799374..90ad39bdeec4 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -128,6 +128,10 @@ enum qca9377_chip_id_rev { #define QCA4019_HW_1_0_BOARD_DATA_FILE "board.bin" #define QCA4019_HW_1_0_PATCH_LOAD_ADDR 0x1234 +/* WCN3990 1.0 definitions */ +#define WCN3990_HW_1_0_DEV_VERSION ATH10K_HW_WCN3990 +#define WCN3990_HW_1_0_FW_DIR ATH10K_FW_DIR "/WCN3990/hw3.0" + #define ATH10K_FW_FILE_BASE "firmware" #define ATH10K_FW_API_MAX 6 #define ATH10K_FW_API_MIN 2 @@ -571,6 +575,7 @@ struct ath10k_hw_ops { extern const struct ath10k_hw_ops qca988x_ops; extern const struct ath10k_hw_ops qca99x0_ops; extern const struct ath10k_hw_ops qca6174_ops; +extern const struct ath10k_hw_ops wcn3990_ops; extern const struct ath10k_hw_clk_params qca6174_clk[]; @@ -667,6 +672,11 @@ ath10k_rx_desc_get_l3_pad_bytes(struct ath10k_hw_params *hw, #define TARGET_TLV_NUM_MSDU_DESC (1024 + 32) #define TARGET_TLV_NUM_WOW_PATTERNS 22 +/* Target specific defines for WMI-HL-1.0 firmware */ +#define TARGET_HL_10_TLV_NUM_PEERS 14 +#define TARGET_HL_10_TLV_AST_SKID_LIMIT 6 +#define TARGET_HL_10_TLV_NUM_WDS_ENTRIES 2 + /* Diagnostic Window */ #define CE_DIAG_PIPE 7