Skip to content

Commit

Permalink
Bluetooth: btusb: use default nvm if boardID is 0 for wcn6855.
Browse files Browse the repository at this point in the history
if boardID is 0, will use the default nvm file without surfix.

Signed-off-by: Tim Jiang <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
  • Loading branch information
tjiang123 authored and holtmann committed Jun 26, 2021
1 parent a1b2fdf commit ca17a5c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit ca17a5c

Please sign in to comment.