Re: [PATCH v5 1/2] Bluetooth: btqca: move WCN7850 workaround to the caller
From: Dmitry Baryshkov
Date: Wed Dec 31 2025 - 12:21:17 EST
On Wed, Dec 31, 2025 at 03:58:16PM +0800, Shuai Zhang wrote:
> To code uniformity, move WCN7850 workaround to the caller.
>
> Signed-off-by: Shuai Zhang <shuai.zhang@xxxxxxxxxxxxxxxx>
> ---
> drivers/bluetooth/btqca.c | 41 +++++++++++++++++++--------------------
> 1 file changed, 20 insertions(+), 21 deletions(-)
>
> @@ -862,8 +845,24 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
>
> err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
> if (err < 0) {
> - bt_dev_err(hdev, "QCA Failed to download patch (%d)", err);
> - return err;
> + /* For WCN6750, if mbn file is not present then check for
> + * tlv file.
> + */
> + if (soc_type == QCA_WCN6750) {
You can move this one level up:
if (soc_type == QCA_WCN6750 && err) {
try TLV
}
if (err) {
bt_dev_err();
return err;
}
> + bt_dev_dbg(hdev, "QCA Failed to request file: %s (%d)",
> + config.fwname, err);
> + config.type = TLV_TYPE_PATCH;
> + snprintf(config.fwname, sizeof(config.fwname),
> + "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);
> + }
> +
> + if (err) {
> + bt_dev_err(hdev, "QCA Failed to request file: %s (%d)",
> + config.fwname, err);
> + return err;
> + }
> }
>
> /* Give the controller some time to get ready to receive the NVM */
> --
> 2.34.1
>
--
With best wishes
Dmitry