mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
Bluetooth: btqca: Add WCN6855 firmware priority selection feature
Historically, WCN685x and QCA2066 shared the same firmware files. Now, changes are planned for the firmware that will make it incompatible with QCA2066, so a new firmware name is required for WCN685x. Test Steps: - Boot device - Check the BTFW loading status via dmesg Sanity pass and Test Log: QCA Downloading qca/wcnhpbftfw21.tlv Direct firmware load for qca/wcnhpbftfw21.tlv failed with error -2 QCA Downloading qca/hpbftfw21.tlv Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
ff3bb47ab4
commit
520257cff5
1 changed files with 18 additions and 3 deletions
|
|
@ -830,8 +830,12 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
|
|||
"qca/msbtfw%02x.mbn", rom_ver);
|
||||
break;
|
||||
case QCA_WCN6855:
|
||||
/* Due to historical reasons, WCN685x chip has been using firmware
|
||||
* without the "wcn" prefix. The mapping between the chip and its
|
||||
* corresponding firmware has now been corrected.
|
||||
*/
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/hpbtfw%02x.tlv", rom_ver);
|
||||
"qca/wcnhpbtfw%02x.tlv", rom_ver);
|
||||
break;
|
||||
case QCA_WCN7850:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
|
|
@ -855,6 +859,10 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
|
|||
"qca/msbtfw%02x.tlv", rom_ver);
|
||||
bt_dev_info(hdev, "QCA Downloading %s", config.fwname);
|
||||
err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
|
||||
} else if (err < 0 && !rampatch_name && soc_type == QCA_WCN6855) {
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/hpbtfw%02x.tlv", rom_ver);
|
||||
err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
|
||||
}
|
||||
|
||||
if (err < 0) {
|
||||
|
|
@ -920,7 +928,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
|
|||
case QCA_WCN6855:
|
||||
qca_read_fw_board_id(hdev, &boardid);
|
||||
qca_get_nvm_name_by_board(config.fwname, sizeof(config.fwname),
|
||||
"hpnv", soc_type, ver, rom_ver, boardid);
|
||||
"wcnhpnv", soc_type, ver, rom_ver, boardid);
|
||||
break;
|
||||
case QCA_WCN7850:
|
||||
qca_get_nvm_name_by_board(config.fwname, sizeof(config.fwname),
|
||||
|
|
@ -933,8 +941,15 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
|
|||
}
|
||||
|
||||
err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
|
||||
if (err < 0 && !firmware_name && soc_type == QCA_WCN6855) {
|
||||
qca_get_nvm_name_by_board(config.fwname, sizeof(config.fwname),
|
||||
"hpnv", soc_type, ver, rom_ver, boardid);
|
||||
err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
|
||||
}
|
||||
|
||||
if (err < 0) {
|
||||
bt_dev_err(hdev, "QCA Failed to download NVM (%d)", err);
|
||||
bt_dev_err(hdev, "QCA Failed to request file: %s (%d)",
|
||||
config.fwname, err);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue