From patchwork Thu Apr 13 08:30:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 9678985 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 1234D601C3 for ; Thu, 13 Apr 2017 08:31:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 041A428637 for ; Thu, 13 Apr 2017 08:31:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC60928649; Thu, 13 Apr 2017 08:31:01 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A72B28637 for ; Thu, 13 Apr 2017 08:31:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755931AbdDMIa7 (ORCPT ); Thu, 13 Apr 2017 04:30:59 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:30006 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755550AbdDMIa6 (ORCPT ); Thu, 13 Apr 2017 04:30:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1492072258; x=1523608258; h=subject:from:to:cc:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VnA8LiTiGxeiRppUmC9bRMPedklbAouaKwJz+DiDbDM=; b=GJpgOXsNRWGzYIxtFUVxVkWtHSEGel+u0JqCJSIcmMrkfZP6FX6k3Fzv BQD9YLqVFuOyqpvd72AaTJtKyKQDodphouaG9ZW+muuhsGXD4j1MaDTmF 2uewEHjgcb4IzWESlcWOPwaYjfJ0rpCz8It6sC3LijFIkx3WnMaxtZ4ki k=; X-IronPort-AV: E=Sophos;i="5.37,194,1488873600"; d="scan'208";a="278400954" Received: from unknown (HELO ironmsg02-L.qualcomm.com) ([10.53.140.109]) by wolverine01.qualcomm.com with ESMTP; 13 Apr 2017 01:30:57 -0700 X-IronPort-AV: E=McAfee;i="5800,7501,8496"; a="904845702" X-MGA-submission: =?us-ascii?q?MDFJGuLrl6/Sj+LEt67IIwxKmbFFvGfoTo0JBM?= =?us-ascii?q?kjOXQv743c+GDs34Xt6yATDBwiUq8ARBT5r8EtJeNo3c0mbnjJa/6ZPs?= =?us-ascii?q?9LM6bbLpuTLP+3SCHDx0CjqlE+2m6B4IEEiiuOIuIP6wS3vH2nYaVvoJ?= =?us-ascii?q?Uk?= Received: from nasanexm02b.na.qualcomm.com ([10.85.0.42]) by ironmsg02-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 13 Apr 2017 01:30:57 -0700 Received: from euamsexm01a.eu.qualcomm.com (10.251.127.40) by nasanexm02b.na.qualcomm.com (10.85.0.42) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Thu, 13 Apr 2017 01:30:56 -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; Thu, 13 Apr 2017 10:30:52 +0200 Subject: [PATCH v7 09/10] ath10k: different fw file name for sdio From: Kalle Valo To: CC: Date: Thu, 13 Apr 2017 11:30:46 +0300 Message-ID: <149207224665.4590.10421467367917959312.stgit@potku.adurom.net> In-Reply-To: <149207201649.4590.5821794186383265138.stgit@potku.adurom.net> References: <149207201649.4590.5821794186383265138.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: NASANEXM01F.na.qualcomm.com (10.85.0.32) To euamsexm01a.eu.qualcomm.com (10.251.127.40) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Erik Stromdahl Since both SDIO 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 23cf6b191770..9ae20680bcb6 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)