mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/1] Bluetooth: btqca: Add WCN6855 firmware priority selection feature
@ 2025-11-14  8:17 Shuai Zhang
  2025-11-14  8:17 ` [PATCH v2 1/1] " Shuai Zhang
  0 siblings, 1 reply; 7+ messages in thread
From: Shuai Zhang @ 2025-11-14  8:17 UTC (permalink / raw)
  To: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz
  Cc: linux-arm-msm, linux-bluetooth, linux-kernel, cheng.jiang,
	quic_chezhou, wei.deng, shuai.zhang, stable

Fixed WCN6855 firmware to use the correct FW file and added a fallback mechanism.

Changes v2:
- Add Fixes tag.
- Add comments in the commit and code to explain the reason for the changes.
- Link to v1
  https://lore.kernel.org/all/20251112074638.1592864-1-quic_shuaz@quicinc.com/
Shuai Zhang (1):
  Bluetooth: btqca: Add WCN6855 firmware priority selection feature

 drivers/bluetooth/btqca.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/1] Bluetooth: btqca: Add WCN6855 firmware priority selection feature
  2025-11-14  8:17 [PATCH v2 0/1] Bluetooth: btqca: Add WCN6855 firmware priority selection feature Shuai Zhang
@ 2025-11-14  8:17 ` Shuai Zhang
  2025-11-14 10:04   ` Paul Menzel
  2025-11-14 11:00   ` Dmitry Baryshkov
  0 siblings, 2 replies; 7+ messages in thread
From: Shuai Zhang @ 2025-11-14  8:17 UTC (permalink / raw)
  To: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz
  Cc: linux-arm-msm, linux-bluetooth, linux-kernel, cheng.jiang,
	quic_chezhou, wei.deng, shuai.zhang, stable

The prefix "wcn" corresponds to the WCN685x chip, while entries without
the "wcn" prefix correspond to the QCA2066 chip. There are some feature
differences between the two.

However, 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.

Cc: stable@vger.kernel.org
Fixes: 30209aeff75f ("Bluetooth: qca: Expand firmware-name to load specific rampatch")
Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
---
 drivers/bluetooth/btqca.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
index 7c958d606..8e0004ef7 100644
--- a/drivers/bluetooth/btqca.c
+++ b/drivers/bluetooth/btqca.c
@@ -847,8 +847,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),
@@ -861,6 +865,13 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
 	}
 
 	err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
+
+	if (!rampatch_name && err < 0 && 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) {
 		bt_dev_err(hdev, "QCA Failed to download patch (%d)", err);
 		return err;
@@ -923,7 +934,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),
@@ -936,6 +947,13 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
 	}
 
 	err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
+
+	if (!firmware_name && err < 0 && 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);
 		return err;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/1] Bluetooth: btqca: Add WCN6855 firmware priority selection feature
  2025-11-14  8:17 ` [PATCH v2 1/1] " Shuai Zhang
@ 2025-11-14 10:04   ` Paul Menzel
  2025-11-14 10:41     ` Shuai Zhang
  2025-11-14 11:00   ` Dmitry Baryshkov
  1 sibling, 1 reply; 7+ messages in thread
From: Paul Menzel @ 2025-11-14 10:04 UTC (permalink / raw)
  To: Shuai Zhang
  Cc: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz,
	linux-arm-msm, linux-bluetooth, linux-kernel, cheng.jiang,
	quic_chezhou, wei.deng, stable

Dear Shuai,


Thank you for your patch.

Am 14.11.25 um 09:17 schrieb Shuai Zhang:
> The prefix "wcn" corresponds to the WCN685x chip, while entries without
> the "wcn" prefix correspond to the QCA2066 chip. There are some feature
> differences between the two.
> 
> However, 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.

Present tense: … is now corrected.

Maybe give one example of the firmware file.

How did you test this? Maybe paste some log lines before and after?

> Cc: stable@vger.kernel.org
> Fixes: 30209aeff75f ("Bluetooth: qca: Expand firmware-name to load specific rampatch")
> Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
> ---
>   drivers/bluetooth/btqca.c | 22 ++++++++++++++++++++--
>   1 file changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
> index 7c958d606..8e0004ef7 100644
> --- a/drivers/bluetooth/btqca.c
> +++ b/drivers/bluetooth/btqca.c
> @@ -847,8 +847,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),
> @@ -861,6 +865,13 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
>   	}
>   
>   	err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
> +
> +	if (!rampatch_name && err < 0 && 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) {
>   		bt_dev_err(hdev, "QCA Failed to download patch (%d)", err);
>   		return err;
> @@ -923,7 +934,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),
> @@ -936,6 +947,13 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
>   	}
>   
>   	err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
> +
> +	if (!firmware_name && err < 0 && 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);
>   		return err;

The diff logs good.

Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>


Kind regards,

Paul

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/1] Bluetooth: btqca: Add WCN6855 firmware priority selection feature
  2025-11-14 10:04   ` Paul Menzel
@ 2025-11-14 10:41     ` Shuai Zhang
  2025-11-14 10:45       ` Paul Menzel
  0 siblings, 1 reply; 7+ messages in thread
From: Shuai Zhang @ 2025-11-14 10:41 UTC (permalink / raw)
  To: Paul Menzel
  Cc: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz,
	linux-arm-msm, linux-bluetooth, linux-kernel, cheng.jiang,
	quic_chezhou, wei.deng, stable

Dear Paul,

Thank you for your feedback.

On 11/14/2025 6:04 PM, Paul Menzel wrote:
> Dear Shuai,
>
>
> Thank you for your patch.
>
> Am 14.11.25 um 09:17 schrieb Shuai Zhang:
>> The prefix "wcn" corresponds to the WCN685x chip, while entries without
>> the "wcn" prefix correspond to the QCA2066 chip. There are some feature
>> differences between the two.
>>
>> However, 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.
>
> Present tense: … is now corrected.
>
> Maybe give one example of the firmware file.
>
> How did you test this? Maybe paste some log lines before and after?
>
Should I put the test log results directly in the commit?

>> Cc: stable@vger.kernel.org
>> Fixes: 30209aeff75f ("Bluetooth: qca: Expand firmware-name to load 
>> specific rampatch")
>> Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
>> ---
>>   drivers/bluetooth/btqca.c | 22 ++++++++++++++++++++--
>>   1 file changed, 20 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
>> index 7c958d606..8e0004ef7 100644
>> --- a/drivers/bluetooth/btqca.c
>> +++ b/drivers/bluetooth/btqca.c
>> @@ -847,8 +847,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),
>> @@ -861,6 +865,13 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t 
>> baudrate,
>>       }
>>         err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
>> +
>> +    if (!rampatch_name && err < 0 && 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) {
>>           bt_dev_err(hdev, "QCA Failed to download patch (%d)", err);
>>           return err;
>> @@ -923,7 +934,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),
>> @@ -936,6 +947,13 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t 
>> baudrate,
>>       }
>>         err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
>> +
>> +    if (!firmware_name && err < 0 && 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);
>>           return err;
>
> The diff logs good.
>
> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
>
>
> Kind regards,
>
> Paul

Kind regards

Shuai


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/1] Bluetooth: btqca: Add WCN6855 firmware priority selection feature
  2025-11-14 10:41     ` Shuai Zhang
@ 2025-11-14 10:45       ` Paul Menzel
  2025-11-14 11:24         ` Shuai Zhang
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Menzel @ 2025-11-14 10:45 UTC (permalink / raw)
  To: Shuai Zhang
  Cc: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz,
	linux-arm-msm, linux-bluetooth, linux-kernel, cheng.jiang,
	quic_chezhou, wei.deng, stable

Dear Shuai,


Am 14.11.25 um 11:41 schrieb Shuai Zhang:

> On 11/14/2025 6:04 PM, Paul Menzel wrote:

>> Am 14.11.25 um 09:17 schrieb Shuai Zhang:
>>> The prefix "wcn" corresponds to the WCN685x chip, while entries without
>>> the "wcn" prefix correspond to the QCA2066 chip. There are some feature
>>> differences between the two.
>>>
>>> However, 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.
>>
>> Present tense: … is now corrected.
>>
>> Maybe give one example of the firmware file.
>>
>> How did you test this? Maybe paste some log lines before and after?
>>
> Should I put the test log results directly in the commit?

Without knowing how they look, I cannot say for sure, but yes, I would 
add as much as possible to the commit message.

>>> Cc: stable@vger.kernel.org
>>> Fixes: 30209aeff75f ("Bluetooth: qca: Expand firmware-name to load 
>>> specific rampatch")
>>> Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
>>> ---
>>>   drivers/bluetooth/btqca.c | 22 ++++++++++++++++++++--
>>>   1 file changed, 20 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
>>> index 7c958d606..8e0004ef7 100644
>>> --- a/drivers/bluetooth/btqca.c
>>> +++ b/drivers/bluetooth/btqca.c
>>> @@ -847,8 +847,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),
>>> @@ -861,6 +865,13 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
>>>       }
>>>         err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
>>> +
>>> +    if (!rampatch_name && err < 0 && 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) {
>>>           bt_dev_err(hdev, "QCA Failed to download patch (%d)", err);
>>>           return err;
>>> @@ -923,7 +934,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),
>>> @@ -936,6 +947,13 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
>>>       }
>>>         err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
>>> +
>>> +    if (!firmware_name && err < 0 && 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);
>>>           return err;
>>
>> The diff logs good.
>>
>> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>


Kind regards,

Paul

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/1] Bluetooth: btqca: Add WCN6855 firmware priority selection feature
  2025-11-14  8:17 ` [PATCH v2 1/1] " Shuai Zhang
  2025-11-14 10:04   ` Paul Menzel
@ 2025-11-14 11:00   ` Dmitry Baryshkov
  1 sibling, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2025-11-14 11:00 UTC (permalink / raw)
  To: Shuai Zhang
  Cc: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz,
	linux-arm-msm, linux-bluetooth, linux-kernel, cheng.jiang,
	quic_chezhou, wei.deng, stable

On Fri, Nov 14, 2025 at 04:17:51PM +0800, Shuai Zhang wrote:
> The prefix "wcn" corresponds to the WCN685x chip, while entries without
> the "wcn" prefix correspond to the QCA2066 chip. There are some feature
> differences between the two.

It's not that it existed beforehand. Please write your commit message
logically: historically WCN685x and QCA2066 were using the same firmware
files, you are planning to introduce changes to the firmware which will
not be compatible with QCA2066, which promts you to use new firmware
name for WCN685x. 

> 
> However, 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.
> 
> Cc: stable@vger.kernel.org
> Fixes: 30209aeff75f ("Bluetooth: qca: Expand firmware-name to load specific rampatch")

No, there was no issue in that commit.

> Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
> ---
>  drivers/bluetooth/btqca.c | 22 ++++++++++++++++++++--
>  1 file changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
> index 7c958d606..8e0004ef7 100644
> --- a/drivers/bluetooth/btqca.c
> +++ b/drivers/bluetooth/btqca.c
> @@ -847,8 +847,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),
> @@ -861,6 +865,13 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
>  	}
>  
>  	err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
> +
> +	if (!rampatch_name && err < 0 && 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) {
>  		bt_dev_err(hdev, "QCA Failed to download patch (%d)", err);
>  		return err;
> @@ -923,7 +934,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),
> @@ -936,6 +947,13 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
>  	}
>  
>  	err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
> +
> +	if (!firmware_name && err < 0 && 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);
>  		return err;
> -- 
> 2.34.1
> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/1] Bluetooth: btqca: Add WCN6855 firmware priority selection feature
  2025-11-14 10:45       ` Paul Menzel
@ 2025-11-14 11:24         ` Shuai Zhang
  0 siblings, 0 replies; 7+ messages in thread
From: Shuai Zhang @ 2025-11-14 11:24 UTC (permalink / raw)
  To: Paul Menzel
  Cc: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz,
	linux-arm-msm, linux-bluetooth, linux-kernel, cheng.jiang,
	quic_chezhou, wei.deng, stable

Dear Paul

On 11/14/2025 6:45 PM, Paul Menzel wrote:
> Dear Shuai,
>
>
> Am 14.11.25 um 11:41 schrieb Shuai Zhang:
>
>> On 11/14/2025 6:04 PM, Paul Menzel wrote:
>
>>> Am 14.11.25 um 09:17 schrieb Shuai Zhang:
>>>> The prefix "wcn" corresponds to the WCN685x chip, while entries 
>>>> without
>>>> the "wcn" prefix correspond to the QCA2066 chip. There are some 
>>>> feature
>>>> differences between the two.
>>>>
>>>> However, 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.
>>>
>>> Present tense: … is now corrected.
>>>
>>> Maybe give one example of the firmware file.
>>>
>>> How did you test this? Maybe paste some log lines before and after?
>>>
>> Should I put the test log results directly in the commit?
>
> Without knowing how they look, I cannot say for sure, but yes, I would 
> add as much as possible to the commit message.
>
Sure, I’ll update.

>>>> Cc: stable@vger.kernel.org
>>>> Fixes: 30209aeff75f ("Bluetooth: qca: Expand firmware-name to load 
>>>> specific rampatch")
>>>> Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
>>>> ---
>>>>   drivers/bluetooth/btqca.c | 22 ++++++++++++++++++++--
>>>>   1 file changed, 20 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
>>>> index 7c958d606..8e0004ef7 100644
>>>> --- a/drivers/bluetooth/btqca.c
>>>> +++ b/drivers/bluetooth/btqca.c
>>>> @@ -847,8 +847,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),
>>>> @@ -861,6 +865,13 @@ int qca_uart_setup(struct hci_dev *hdev, 
>>>> uint8_t baudrate,
>>>>       }
>>>>         err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
>>>> +
>>>> +    if (!rampatch_name && err < 0 && 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) {
>>>>           bt_dev_err(hdev, "QCA Failed to download patch (%d)", err);
>>>>           return err;
>>>> @@ -923,7 +934,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),
>>>> @@ -936,6 +947,13 @@ int qca_uart_setup(struct hci_dev *hdev, 
>>>> uint8_t baudrate,
>>>>       }
>>>>         err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
>>>> +
>>>> +    if (!firmware_name && err < 0 && 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);
>>>>           return err;
>>>
>>> The diff logs good.
>>>
>>> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
>
>
> Kind regards,
>
> Paul

Kind regards,

Shuai



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-11-14 11:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-14  8:17 [PATCH v2 0/1] Bluetooth: btqca: Add WCN6855 firmware priority selection feature Shuai Zhang
2025-11-14  8:17 ` [PATCH v2 1/1] " Shuai Zhang
2025-11-14 10:04   ` Paul Menzel
2025-11-14 10:41     ` Shuai Zhang
2025-11-14 10:45       ` Paul Menzel
2025-11-14 11:24         ` Shuai Zhang
2025-11-14 11:00   ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®