From patchwork Tue Feb 21 16:15:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Stromdahl X-Patchwork-Id: 9585065 X-Patchwork-Delegate: kvalo@adurom.com 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 36EF26042F for ; Tue, 21 Feb 2017 16:17:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2496C28527 for ; Tue, 21 Feb 2017 16:17:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1963A285C6; Tue, 21 Feb 2017 16:17:31 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham 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 9645D28527 for ; Tue, 21 Feb 2017 16:17:30 +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=60c/S4jx2GH1EOx5W7y82dmTzdnqmApgDkyyxjcZuyo=; b=BxH537gp+AtPsCPq5fqXjd/UtJ LSQD7UT5hfNODgAMbjlD9Y0D2zCELYKQaqDOLXLgV8VmtnyTBLm6VzUn9G8+i2TBh1HdKBOyLWzK/ ORcioV+jtiuAjSLJU3t4+3eRxneFt4Jsszf0RShdanoYmn18pMC7tnTBQENV8PJuXIrsQvJLE8rkz wcGivTMqHsaVjnzDOpyAfQl1weVygIhLznCIQMG/eAX7buWfUnSFXPFNeA5pHgNXke3lrksSFY2Ha 4xlEorgb2Azi5i+gDMQkomYE1Ah9225p+z01ajzfJs5QIK2egRQVFR1hcSeteSTU6J7YCb90Vo+rt JQHqai7g==; 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 1cgD80-0007RB-5r; Tue, 21 Feb 2017 16:17:24 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cgD7R-0006yv-RX for ath10k@bombadil.infradead.org; Tue, 21 Feb 2017 16:16:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=G9N2wMHOJtcpvfM4n+9KV56plDTmg9FDeVI90pmuyoA=; b=yia31jpEyBakwm9E4J3bwM6LN K5kUOsaGK2hih3JkCNHTNJE79YrSluwP5A+X7Z2GpGkAIiOvr6syX5Zuvv5DY8bHjIwdCux/is9E5 04DKoodZjcssFD3QoLWmUIIBMtjakb4JipKCMPAPBJxkHqeN9TxuYScG+loc9svNrh5U66aKSJFaF Bquii6anLeLMGFgnbcwINTswTezDkL2enqc3lu7q+v6BtbfU+3OhTj7Kf8uaX9m0Nv+XP5xE3Xvmu c2sLM6Z+5s6P9GtnL/WQ1cKAxB1rDQL9oBikhLrsMpq8lsRhZNXuXd5k5xv9fZYydrrZvkftCGAaL 6mvl9N4HA==; Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cgD7P-0007Gr-Sq for ath10k@lists.infradead.org; Tue, 21 Feb 2017 16:16:48 +0000 Received: by mail-lf0-x243.google.com with SMTP id z127so9537348lfa.2 for ; Tue, 21 Feb 2017 08:16:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G9N2wMHOJtcpvfM4n+9KV56plDTmg9FDeVI90pmuyoA=; b=KTYfVaFgeeUSP8wu3ksy3RTIhyeVekeShcbVM7ccqOI37sfg9KqH6t7krJyah/+l/p wqdK46HGgFCipEZu4SsQtF7ONHgwtWebOqowMbz/kRyZZDlcq5qPKxpd9k55NdJ3j4mF dSf31GNRbvp/Bnujr79CPO8+KBlg/+PEmMOPBORZlzl+cY+LDW0QgwLBx3/cMIMD/IEr yjAGHIc0KR0GG/f/JJlI99XIhL0gmEREwf36cg58UGdMFTEZSS5DG7j5J0oh/s1uSoUm 57TCUw6wI5nTNBd0YjjUVGNXXOXkIy8ogSS4g5wn4OoV6JUVX1/2aODn68XspNgoZfUq AJWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G9N2wMHOJtcpvfM4n+9KV56plDTmg9FDeVI90pmuyoA=; b=kXJCdXiGGeJek5ggJckBrxBqpJsdXbuvOljXEwkWHzzvwKeWHYoBFlNYKVh4XEsXiQ ertYj4X8gyvormno4gp4moXQcb/ln4aTxn/FHyMkD96KyoxwM7a+Ae+JpQfkgaPvcl2R 3SjnAquMslm0wxBcROTb8Ncd3ZDTtsb8mi+DcMAfDj2IfXGC/fKfLZSfLX1KUF4BLJxA aceGPzZaoynHdhBzLYT7n9qkNE1iyesmwGX4KLcXyWKRNsz73yOqM+KHyL/TRGGtY79P 68XZjmNSw3cLhLXLmGQzKCaJLIV5I0rw3Hf/LqHze+9R4w7afJTzK08AXF1NhliOmYP7 Excg== X-Gm-Message-State: AMke39l4CdtEcrNFya2ZtljuYm5tQdetLy9UceiSMGXjsNWZ1hWkIKeqfb7TZ2UibaEI5w== X-Received: by 10.46.88.79 with SMTP id x15mr7149024ljd.39.1487693784592; Tue, 21 Feb 2017 08:16:24 -0800 (PST) Received: from erik-mate-1604.lan (90-227-62-61-no75.tbcn.telia.com. [90.227.62.61]) by smtp.gmail.com with ESMTPSA id t29sm6336069ljd.39.2017.02.21.08.16.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Feb 2017 08:16:24 -0800 (PST) From: Erik Stromdahl To: kvalo@qca.qualcomm.com, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Subject: [RFC v4 13/21] ath10k: different fw file names for usb and sdio Date: Tue, 21 Feb 2017 17:15:33 +0100 Message-Id: <1487693741-10042-14-git-send-email-erik.stromdahl@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1487693741-10042-1-git-send-email-erik.stromdahl@gmail.com> References: <1487693741-10042-1-git-send-email-erik.stromdahl@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170221_111648_084584_B9CB3C9E X-CRM114-Status: UNSURE ( 6.95 ) 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: Erik Stromdahl MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since both SDIO and USB based chipsets will use different firmware from the PCIe and AHB chipsets, the fw file name must be different depending on bus type. The new firmware names are: For PCIe and AHB: firmware-.bin (same as before) For SDIO: firmware-sdio-.bin For USB: firmware-usb-.bin Signed-off-by: Erik Stromdahl --- drivers/net/wireless/ath/ath10k/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 39c407e..9d60f4b 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -1387,7 +1387,13 @@ int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name, static void ath10k_core_get_fw_name(struct ath10k *ar, char *fw_name, size_t fw_name_len, int fw_api) { - scnprintf(fw_name, fw_name_len, "%s-%d.bin", ATH10K_FW_FILE_BASE, fw_api); + if ((ar->hif.bus != ATH10K_BUS_PCI) && (ar->hif.bus != ATH10K_BUS_AHB)) + scnprintf(fw_name, fw_name_len, "%s-%s-%d.bin", + ATH10K_FW_FILE_BASE, ath10k_bus_str(ar->hif.bus), + fw_api); + else + scnprintf(fw_name, fw_name_len, "%s-%d.bin", + ATH10K_FW_FILE_BASE, fw_api); } static int ath10k_core_fetch_firmware_files(struct ath10k *ar)