From patchwork Tue Jun 5 12:34:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Govind Singh X-Patchwork-Id: 10448167 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 B4EA360467 for ; Tue, 5 Jun 2018 12:35:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3169285A9 for ; Tue, 5 Jun 2018 12:35:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 97891290C2; Tue, 5 Jun 2018 12:35:14 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 16159285A9 for ; Tue, 5 Jun 2018 12:35:14 +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: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:In-Reply-To: References:List-Owner; bh=V5tSceelTn73MNCDuL8EY7nqIZhyta+RDwsNFUeuMas=; b=sFm Eej53rQ+gjUY6GTgXNIdqwRMBovl8px3KXMZogtVLDqvF3hQK5kX0lJqKuWNZ9JuHehqGxmOFzoXV tSvU8ZMHMHdvEWfAYOaOIwhZT/xzKUZH4EsTgnE5zptgMKihbIg9Uly08bvarTHxgXlVN5iXnKGTs 324KXx2Wc4g1RaEk2r4KadFjCRKPkb4Gz2WH5mcZvpA7Z1xuHlyV2AmErrMMBlxwfHMPdhhiKM43P xp7e/ZIgjWx5d8Tos3gPA7iDHoXpXVqUwQ7eDfH2cCNks5RJXGEFQ3cRorEXA+Y5+sjDCseezTXIV 2rsujhZNlbyqmcC0Edd/bo3Am5a6cdg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fQBB7-00073c-PP; Tue, 05 Jun 2018 12:35:09 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fQBB4-0006gF-1E for ath10k@lists.infradead.org; Tue, 05 Jun 2018 12:35:07 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 91F5E606DD; Tue, 5 Jun 2018 12:34:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528202095; bh=QcX8326wPjZDJPziF8TAtrZu569ZlmSUjnCk4/5UsJk=; h=From:To:Cc:Subject:Date:From; b=GnTzRd6oBgbj2EvuEuVSR7S8lXuHKkyobHBL2zvuruo1nXlEDEgYXw+YfeXfapvob 3Gw2fplHpAvhMVXzrezr3DxVQgFU+oGWt6RSWnH1RZSionTesf0yskQay1pE78gLVX 01KvuJyHK+zlL4rbX2+q3s3eNsx4HUhO9Q7m5zxs= 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 4D232601A8; Tue, 5 Jun 2018 12:34:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528202095; bh=QcX8326wPjZDJPziF8TAtrZu569ZlmSUjnCk4/5UsJk=; h=From:To:Cc:Subject:Date:From; b=GnTzRd6oBgbj2EvuEuVSR7S8lXuHKkyobHBL2zvuruo1nXlEDEgYXw+YfeXfapvob 3Gw2fplHpAvhMVXzrezr3DxVQgFU+oGWt6RSWnH1RZSionTesf0yskQay1pE78gLVX 01KvuJyHK+zlL4rbX2+q3s3eNsx4HUhO9Q7m5zxs= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4D232601A8 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: andy.gross@linaro.org, bjorn.andersson@linaro.org, david.brown@linaro.org, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Subject: [PATCH v2 2/6] ath10k: Add support to create boardname for non-bmi target Date: Tue, 5 Jun 2018 18:04:48 +0530 Message-Id: <20180605123448.32331-1-govinds@codeaurora.org> X-Mailer: git-send-email 2.17.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180605_053506_132462_A81EDCA8 X-CRM114-Status: UNSURE ( 9.84 ) 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: Govind Singh , Rakesh Pillai MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.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 Acked-by: Niklas Cassel --- drivers/net/wireless/ath/ath10k/core.c | 14 ++++++++++++++ drivers/net/wireless/ath/ath10k/core.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 4cf54a7ef09a..8a592019cc4d 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -1429,6 +1429,20 @@ static int ath10k_core_create_board_name(struct ath10k *ar, char *name, goto out; } + if (ar->id.qmi_ids_valid) { + if (ar->id.qmi_board_id > 0x99) + scnprintf(name, name_len, + "bus=%s,qmi-board-id=%03x", + ath10k_bus_str(ar->hif.bus), + ar->id.qmi_board_id); + else + scnprintf(name, name_len, + "bus=%s,qmi-board-id=b%02x", + 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 951dbdd1c9eb..0a2e4a5c3612 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -940,7 +940,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];