Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp659490pxv; Thu, 15 Jul 2021 12:44:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdBZl1ltjbyqPY5MNx0jWWSbV4lKMsi67sHnJzDMy8ecXZL7/8Lro1JxH/hos10vXqSUGq X-Received: by 2002:a17:906:28c4:: with SMTP id p4mr7332435ejd.302.1626378262485; Thu, 15 Jul 2021 12:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626378262; cv=none; d=google.com; s=arc-20160816; b=hMRryBttOinIt/5BH7BIlnLTaHvO0XMDjWe/LKt1NxggBzXPK9PnvSOA62Tk//QRgX nCoFyPin9fq4GXA8Z6kZLbvHWmwgoALwFpw2XqoF+tgY96rHvKFUBI1sj0NXVCrZBZ8K 13qPVVj+NJcxCePqq+7j1XwWEs976ybv80/DD7uDICD1823kfTrHqhfFx2dIfRRBfD1f SHiYTzeS6iPJwzjjgUB6XkImw0cGkMXLLiEiRGjCfbkYX9jAr0taXL4BZyq3rG5CkjSh UlugH8aa5AHEaHm1445vbo4T9XYY+lkRdGRNMfE4FtzbjtjsyGVIPTduLIeDsgAywgHf 7W3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IpY993ATaq8HGIEXPI22nvFw19iXuEf58nsJRBTk1FU=; b=Zc7Hc3iVkkX/aaisrlv286UKlcW4WwCu/fXmpTZV0xneeD+53yGcs5EZZbHviNBS38 BnnPyPq9BOogwEU/H0fauZNaOr0Ej9hMTJ9BXKjtcrsn3G4iB2VP9SDy+app+eVjwq7m mYjN67V19EEriuDsJl1VDZWJKRJQOOg2U5+llJKVB7eK9KE3iLMObrrIZlj4pkj1BUnu vQ3jncNUZF8hXeWxWfWIp6AZhpQIBg7fERJZnEUygbcH/5a9LqRMXb50WJPWyTcm2IrB q2Id+DaKKFS9LU9uycmHB4mJH72831a7L3S8mLDWRykhSIx4TvQuHGBHb/ioergfAHPw tJuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EQj9lABb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 26si8303080ejk.553.2021.07.15.12.43.59; Thu, 15 Jul 2021 12:44:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EQj9lABb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345355AbhGOTo5 (ORCPT + 99 others); Thu, 15 Jul 2021 15:44:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:50846 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241580AbhGOTPR (ORCPT ); Thu, 15 Jul 2021 15:15:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 39AA46141E; Thu, 15 Jul 2021 19:11:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626376292; bh=1BuftYxYlodzTTWsccJ8mb6qMW4RWaRgd+qRmstKHp0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EQj9lABbJpBwH+3raszi2Ae57/Mc1ZQDf8XY4hGGrJ2aY0c1Hid0UqLv+EFkAxIya EWZrFSzTnV75CX53BsS+z+dKX6e+nHLzM1i6aZ3YaJ24W6ndJPMQ3SH2jetqJCZQ7s TK4odHiJjfsCVLnD/d9F0WcdZGXAkKNmBpDoNSVs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tim Jiang , Marcel Holtmann , Sasha Levin Subject: [PATCH 5.13 167/266] Bluetooth: btusb: use default nvm if boardID is 0 for wcn6855. Date: Thu, 15 Jul 2021 20:38:42 +0200 Message-Id: <20210715182641.949068003@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182613.933608881@linuxfoundation.org> References: <20210715182613.933608881@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tim Jiang [ Upstream commit ca17a5cccf8b6d35dab4729bea8f4350bc0b4caf ] if boardID is 0, will use the default nvm file without surfix. Signed-off-by: Tim Jiang Signed-off-by: Marcel Holtmann Signed-off-by: Sasha Levin --- drivers/bluetooth/btusb.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 4c18a85a1070..1cec9b2353c6 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -4163,9 +4163,15 @@ static int btusb_setup_qca_load_nvm(struct hci_dev *hdev, int err; if (((ver->flag >> 8) & 0xff) == QCA_FLAG_MULTI_NVM) { - snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x_%04x.bin", - le32_to_cpu(ver->rom_version), - le16_to_cpu(ver->board_id)); + /* if boardid equal 0, use default nvm without surfix */ + if (le16_to_cpu(ver->board_id) == 0x0) { + snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x.bin", + le32_to_cpu(ver->rom_version)); + } else { + snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x_%04x.bin", + le32_to_cpu(ver->rom_version), + le16_to_cpu(ver->board_id)); + } } else { snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x.bin", le32_to_cpu(ver->rom_version)); -- 2.30.2