[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210706111409.2058071-180-sashal@kernel.org>
Date: Tue, 6 Jul 2021 07:14:00 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Tim Jiang <tjiang@...eaurora.org>,
Marcel Holtmann <marcel@...tmann.org>,
Sasha Levin <sashal@...nel.org>,
linux-bluetooth@...r.kernel.org
Subject: [PATCH AUTOSEL 5.13 180/189] Bluetooth: btusb: use default nvm if boardID is 0 for wcn6855.
From: Tim Jiang <tjiang@...eaurora.org>
[ Upstream commit ca17a5cccf8b6d35dab4729bea8f4350bc0b4caf ]
if boardID is 0, will use the default nvm file without surfix.
Signed-off-by: Tim Jiang <tjiang@...eaurora.org>
Signed-off-by: Marcel Holtmann <marcel@...tmann.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
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
Powered by blists - more mailing lists