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: 9585039 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 0F67A6042F for ; Tue, 21 Feb 2017 16:16:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2219283A6 for ; Tue, 21 Feb 2017 16:16:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6FF9285C6; Tue, 21 Feb 2017 16:16:57 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 A2691283A6 for ; Tue, 21 Feb 2017 16:16:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753807AbdBUQQz (ORCPT ); Tue, 21 Feb 2017 11:16:55 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:34270 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753754AbdBUQQb (ORCPT ); Tue, 21 Feb 2017 11:16:31 -0500 Received: by mail-lf0-f66.google.com with SMTP id h67so3752237lfg.1 for ; Tue, 21 Feb 2017 08:16:30 -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=dsn1jle9Zrb1rKYSFrbsUASbhPMMpkkC7JgnIi0hNs2LuXORmeJWnz3/obTOLy/MzL 6XVTeUb6SpJKUloAC9pGDo/U3QLBIyflFE1bIokcsDKUkKab1ODdX2Br7QKxTCGCb8/p Wks3f+fBuQy1OvOFFNIiiGBRQ63aPNPFoxgNXp2xEI7ofE45LnEu8vlwNaBpb1ZdlzgP ypuR9yhCgJOmuFDiHHhDlBPEdWU8lqBUWV1OVBub6pGNZZcwnCOt+p5aQWLhKLnGoUiK pqdTMDm/7340VV6udaBCKExpXnBXGHfyamJ4Ilpol89URhlwPTs7JQm+66jmQsgiUvkH 4XYg== X-Gm-Message-State: AMke39ms51Bz03FwWzV9xqyYVC+rS0ydwmPoQmV0TA7Y4ez4IJ5pSAxW7PIT2Qo+VVDxhg== 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 Cc: Erik Stromdahl 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> 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 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)