From patchwork Fri Apr 26 06:41:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 10918355 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0145714C0 for ; Fri, 26 Apr 2019 06:41:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E122428D9F for ; Fri, 26 Apr 2019 06:41:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD9BF28DAE; Fri, 26 Apr 2019 06:41:48 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 8900128D7A for ; Fri, 26 Apr 2019 06:41:48 +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=mo/GzAO2RDFR4XjDhYaKWtA12xQmP3hdEeL1lk954ys=; b=dkBIfdCLuXsiq590biQsxZTsR0 ASQCnUC8fyeVuyaVqhZroyKgEgqmDQh1cyyAVkVd18K2KVKzIb/d7qzFZJphHfG9SD6CLL+LZHblL HroQRCTHzq1san1abF0wUXarfEC7ACxmq5EFiRoC3imPs/dcQTGmUnmjxfdb2CMv5e6MnUFX580P6 ee7nhZTFAUtRUZu4lreB1Ytekc/lVGYJg941UZoOoiPQ8inazo+eLF3COUalhxJyVbt2Q8inDZ4Lr 7MO5b8SsIcZdYXDoF8X1jjSMYLh4yTbAoz1hzlJ0T5KFueupgrV5M5587vbOtLxYQBcEHLeXVSyrr r/jetxIQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJuY9-0007pg-Hj; Fri, 26 Apr 2019 06:41:33 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJuY0-0007dL-RW for ath10k@lists.infradead.org; Fri, 26 Apr 2019 06:41:27 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7A1236086B; Fri, 26 Apr 2019 06:41:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1556260884; bh=SGBwD3fHfRtvIkwiGKLdm/PJH/KChM7C0ch4XU9or0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mycD0lXdQjyQv7jUsam2baN/90CSzhDPR1Wq3ISLWZ0/T4kWQ8MrsFAN7A6aGyi+2 f0MeDMmsLNr+4g15iSxhj0kRVhQ+PKGDJfB5oQzZBjDBHIbD7lpPWGBTqcQt5cupll lhp+Hmu1GGryPXN9NCVWJJPR/Gnb1i+Qencqu2iQ= Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1E2256076C; Fri, 26 Apr 2019 06:41:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1556260884; bh=SGBwD3fHfRtvIkwiGKLdm/PJH/KChM7C0ch4XU9or0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mycD0lXdQjyQv7jUsam2baN/90CSzhDPR1Wq3ISLWZ0/T4kWQ8MrsFAN7A6aGyi+2 f0MeDMmsLNr+4g15iSxhj0kRVhQ+PKGDJfB5oQzZBjDBHIbD7lpPWGBTqcQt5cupll lhp+Hmu1GGryPXN9NCVWJJPR/Gnb1i+Qencqu2iQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1E2256076C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: ath10k@lists.infradead.org Subject: [PATCH 5/5] ath10k: enable QCA6174 hw3.2 SDIO hardware Date: Fri, 26 Apr 2019 09:41:11 +0300 Message-Id: <1556260871-2919-6-git-send-email-kvalo@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556260871-2919-1-git-send-email-kvalo@codeaurora.org> References: <1556260871-2919-1-git-send-email-kvalo@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190425_234125_148871_47146D9B X-CRM114-Status: GOOD ( 12.84 ) 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: linux-wireless@vger.kernel.org, Wen Gong MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wen Gong After implementing PN replay check we can enable SDIO support on QCA6174. Tested with client mode on all security modes, and fragmentation as well. AP mode does not work yet. Also tone down the warning about SDIO being not ready yet. Tested on QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. AP mode is not working yet. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/core.c | 27 +++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/hw.h | 1 + drivers/net/wireless/ath/ath10k/sdio.c | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index cfd7bb29a1ec..525a7ff87bf4 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -154,6 +154,33 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .fw_diag_ce_download = false, }, { + .id = QCA6174_HW_3_2_VERSION, + .dev_id = QCA6174_3_2_DEVICE_ID, + .bus = ATH10K_BUS_SDIO, + .name = "qca6174 hw3.2 sdio", + .patch_load_addr = QCA6174_HW_3_0_PATCH_LOAD_ADDR, + .uart_pin = 19, + .otp_exe_param = 0, + .channel_counters_freq_hz = 88000, + .max_probe_resp_desc_thres = 0, + .cal_data_len = 0, + .fw = { + .dir = QCA6174_HW_3_0_FW_DIR, + .board = QCA6174_HW_3_0_BOARD_DATA_FILE, + .board_size = QCA6174_BOARD_DATA_SZ, + .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, + }, + .hw_ops = &qca6174_ops, + .hw_clk = qca6174_clk, + .target_cpu_freq = 176000000, + .decap_align_bytes = 4, + .n_cipher_suites = 8, + .num_peers = 10, + .ast_skid_limit = 0x10, + .num_wds_entries = 0x20, + .uart_pin_workaround = true, + }, + { .id = QCA6174_HW_2_1_VERSION, .dev_id = QCA6164_2_1_DEVICE_ID, .bus = ATH10K_BUS_PCI, diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index a92fce1bb6f0..248cfb4e53c3 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -24,6 +24,7 @@ enum ath10k_bus { #define QCA988X_2_0_DEVICE_ID (0x003c) #define QCA6164_2_1_DEVICE_ID (0x0041) #define QCA6174_2_1_DEVICE_ID (0x003e) +#define QCA6174_3_2_DEVICE_ID (0x0042) #define QCA99X0_2_0_DEVICE_ID (0x0040) #define QCA9888_2_0_DEVICE_ID (0x0056) #define QCA9984_1_0_DEVICE_ID (0x0046) diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index 30102090e282..a2c1bad67b5b 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -2059,7 +2059,7 @@ static int ath10k_sdio_probe(struct sdio_func *func, } /* TODO: remove this once SDIO support is fully implemented */ - ath10k_warn(ar, "WARNING: ath10k SDIO support is incomplete, don't expect anything to work!\n"); + ath10k_warn(ar, "WARNING: ath10k SDIO support is work-in-progress, problems may arise!\n"); return 0;