From patchwork Fri Jul 6 08:56:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Govind Singh X-Patchwork-Id: 10511097 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 76A696024A for ; Fri, 6 Jul 2018 08:56:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66DA5284E9 for ; Fri, 6 Jul 2018 08:56:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B686284EE; Fri, 6 Jul 2018 08:56:58 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, 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 ECFE8284E9 for ; Fri, 6 Jul 2018 08:56:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753625AbeGFI44 (ORCPT ); Fri, 6 Jul 2018 04:56:56 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55248 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753598AbeGFI4v (ORCPT ); Fri, 6 Jul 2018 04:56:51 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 19BBB60B3B; Fri, 6 Jul 2018 08:56:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530867411; bh=bgTro/3NM+gjQtjiKpEGdRU+72o3qpqeZThzXVSi0l0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kux/zZbO+Mf9l7pI2yTh7oG+VfY9DIV1fNbJR+lqsB/DWqBNA2fawjLET4zDSl0/x SUTm2NCF/DQWLm4Y1CJbtkdwkVEiM/97OpQxIEG02wdLSmXXa4fHWlVSYyVzu2biNH OeqJbBCQlasx8ypFZDhNKtuPuMA7MEbme54NeaXI= Received: from govinds-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: govinds@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id EF9EC60B10; Fri, 6 Jul 2018 08:56:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530867410; bh=bgTro/3NM+gjQtjiKpEGdRU+72o3qpqeZThzXVSi0l0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gPK6hbpMu30Ijl8BvW0p+D77l2ds60MekhiMdD/phKpmBomOLzsFNoI/XGnVXTnPd V1ZjSC4fxa8wiiFHRAA0f1soU5pYCYVNWuKjIyDN08HzJl6joApSxtMVQ8B6ZirCd+ QUUqM8t8YOrqk7eyoAohVqqKRZzGdc2/45Ag/ARI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org EF9EC60B10 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=govinds@codeaurora.org From: Govind Singh To: bjorn.andersson@linaro.org, david.brown@linaro.org, andy.gross@linaro.org, niklas.cassel@linaro.org, ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Rakesh Pillai , Govind Singh Subject: [PATCH v3 2/6] ath10k: Add support to create boardname for non-bmi target Date: Fri, 6 Jul 2018 14:26:19 +0530 Message-Id: <20180706085622.27945-3-govinds@codeaurora.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180706085622.27945-1-govinds@codeaurora.org> References: <20180706085622.27945-1-govinds@codeaurora.org> 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: Rakesh Pillai Add support to create the boardname for non-bmi targets like WCN3990, which uses qmi for bdf download. This boardname is used to parse the board data from board-2.bin. Signed-off-by: Rakesh Pillai Signed-off-by: Govind Singh --- drivers/net/wireless/ath/ath10k/core.c | 8 ++++++++ drivers/net/wireless/ath/ath10k/core.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 85c58ebbfb26..840e301b6a6e 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -1440,6 +1440,14 @@ static int ath10k_core_create_board_name(struct ath10k *ar, char *name, goto out; } + if (ar->id.qmi_ids_valid) { + scnprintf(name, name_len, + "bus=%s,qmi-board-id=%x", + ath10k_bus_str(ar->hif.bus), + ar->id.qmi_board_id); + goto out; + } + scnprintf(name, name_len, "bus=%s,vendor=%04x,device=%04x,subsystem-vendor=%04x,subsystem-device=%04x%s", ath10k_bus_str(ar->hif.bus), diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 427ee5752bb0..20f03f3a7080 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -941,7 +941,9 @@ struct ath10k { u32 subsystem_device; bool bmi_ids_valid; + bool qmi_ids_valid; u8 bmi_board_id; + u8 qmi_board_id; u8 bmi_chip_id; char bdf_ext[ATH10K_SMBIOS_BDF_EXT_STR_LENGTH];