From patchwork Wed Mar 15 15:46:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 9625999 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 3D8B7604A9 for ; Wed, 15 Mar 2017 15:47:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 304CD26247 for ; Wed, 15 Mar 2017 15:47:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2554826E54; Wed, 15 Mar 2017 15:47:26 +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_SIGNED, DKIM_VALID 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 ACA9D26247 for ; Wed, 15 Mar 2017 15:47:25 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:To:From:Subject:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/GprsCpvChJKDERBdt0Ekl3w3uL1xc6HXpyH0DFsLqY=; b=HcJxn2OcqiaIpY 1i6zgYrsdkvsQezz5xOT7bBZ+tIu/ZFKtFi8nNcFX2J47eqABr+79BXia1ZAfisLvXyc0YIhbVAXE 6mVtuMDws+BODU7Zr0+Idst6Jnzj4bUthN5LDBEDGoUUIMmi0zpJ+vJkmfKwcCsvjgcLYeRWEttzu e09TgsUw2U2Ypso8inwnTEWjDAHJpJckIMMni+Oajl00/vwMuV4PdCzpEXovKSUHOKrjJk8EX1WXU RWs8HvmH3jkzP3sdAb2GTviXZg2N4/lDnjhh2Rl+QUnzS16fhkXx/CP1qbnxMFwqqv+6VzOS4rutM An3aECTlhEJ1bTfMU+Aw==; 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 1coB8y-000714-Jv; Wed, 15 Mar 2017 15:47:20 +0000 Received: from wolverine01.qualcomm.com ([199.106.114.254]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1coB8u-0006uM-E5 for ath10k@lists.infradead.org; Wed, 15 Mar 2017 15:47:18 +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=1489592836; x=1521128836; h=subject:from:to:cc:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0XdkdRYaWD022uqocD2qthdxsR3bbykG5scndkCdf4k=; b=w6578zFQqvVnjPCj7oihZl4q06mnT8oTgWD/kNJJC61w7NHpTZbyKDR2 LOkCcESlQSSPN9fa9pxj+eoH9zqayh4UtjMdRWneg5qAwlPTL/9EkhSIA ne1rIQUCICEKuRGWj+RRZEtuy4ZYqoYM3sRZ7nfDxmmvjtBBF7DCMkkGl E=; X-IronPort-AV: E=Sophos;i="5.36,169,1486454400"; d="scan'208";a="270785886" Received: from unknown (HELO Ironmsg03-L.qualcomm.com) ([10.53.140.110]) by wolverine01.qualcomm.com with ESMTP; 15 Mar 2017 08:46:55 -0700 X-IronPort-AV: E=McAfee;i="5800,7501,8467"; a="1331952662" X-MGA-submission: =?us-ascii?q?MDGyYYHvFSDT+aEjITNf8tbiFTdkLPA7Qke8hb?= =?us-ascii?q?ZtevheNM7p5Puhn2+vQpyt+cQXd+qaJzBg3Hx8aJ1pKDHiy4GJvaHOaV?= =?us-ascii?q?hzSzJpxLlxeTi3bufaAzVAbcjCG11pFEZh6T4pHpcWzjgwvt22wPGAAx?= =?us-ascii?q?W0?= Received: from nasanexm02e.na.qualcomm.com ([10.85.0.86]) by Ironmsg03-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 15 Mar 2017 08:46:55 -0700 Received: from euamsexm01a.eu.qualcomm.com (10.251.127.40) by nasanexm02e.na.qualcomm.com (10.85.0.86) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Wed, 15 Mar 2017 08:46:54 -0700 Received: from potku.adurom.net (10.80.80.8) by euamsexm01a.eu.qualcomm.com (10.251.127.40) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Wed, 15 Mar 2017 16:46:49 +0100 Subject: [PATCH v6 09/10] ath10k: different fw file names for usb and sdio From: Kalle Valo To: Date: Wed, 15 Mar 2017 17:46:44 +0200 Message-ID: <148959280431.31432.16087997710973721077.stgit@potku.adurom.net> In-Reply-To: <148959263520.31432.8488419244476213373.stgit@potku.adurom.net> References: <148959263520.31432.8488419244476213373.stgit@potku.adurom.net> User-Agent: StGit/0.17.1-17-ge4e0 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01B.na.qualcomm.com (10.85.0.82) To euamsexm01a.eu.qualcomm.com (10.251.127.40) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170315_084716_556855_8D709296 X-CRM114-Status: UNSURE ( 6.18 ) 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: linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Erik Stromdahl 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 Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/core.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index d7fb11107df4..d2648d09a772 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -1398,7 +1398,18 @@ 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); + switch (ar->hif.bus) { + case ATH10K_BUS_SDIO: + scnprintf(fw_name, fw_name_len, "%s-%s-%d.bin", + ATH10K_FW_FILE_BASE, ath10k_bus_str(ar->hif.bus), + fw_api); + break; + case ATH10K_BUS_PCI: + case ATH10K_BUS_AHB: + scnprintf(fw_name, fw_name_len, "%s-%d.bin", + ATH10K_FW_FILE_BASE, fw_api); + break; + } } static int ath10k_core_fetch_firmware_files(struct ath10k *ar)