diff options
author | Tim Jiang <tjiang@codeaurora.org> | 2021-06-01 17:57:25 +0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2021-06-26 07:12:39 +0200 |
commit | ca17a5cccf8b6d35dab4729bea8f4350bc0b4caf (patch) | |
tree | df4af6829b75982bf8ba257696ec5de18cd3a8bd | |
parent | a1b2fdf97f3659948d83ff491abbab73e591c982 (diff) | |
download | linux-ca17a5cccf8b6d35dab4729bea8f4350bc0b4caf.tar.bz2 |
Bluetooth: btusb: use default nvm if boardID is 0 for wcn6855.
if boardID is 0, will use the default nvm file without surfix.
Signed-off-by: Tim Jiang <tjiang@codeaurora.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | drivers/bluetooth/btusb.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index b5813aa209ed..ad07dbedc284 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -4172,9 +4172,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)); |