diff mbox series

[v1] Bluetooth: btusb: use default nvm if boardID is 0 for wcn6855.

Message ID 1618996576-7743-1-git-send-email-zijuhu@codeaurora.org
State New
Headers show
Series [v1] Bluetooth: btusb: use default nvm if boardID is 0 for wcn6855. | expand

Commit Message

Zijun Hu April 21, 2021, 9:16 a.m. UTC
From: Tim Jiang <tjiang@codeaurora.org>

if boardID is 0, will use the default nvm file without surfix.

Signed-off-by: Tim Jiang <tjiang@codeaurora.org>
---
 drivers/bluetooth/btusb.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

Comments

bluez.test.bot@gmail.com April 21, 2021, 10:10 a.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=470771

---Test result---

##############################
Test: CheckPatch - PASS


##############################
Test: CheckGitLint - FAIL
Bluetooth: btusb: use default nvm if boardID is 0 for wcn6855.
1: T3 Title has trailing punctuation (.): "Bluetooth: btusb: use default nvm if boardID is 0 for wcn6855."


##############################
Test: CheckBuildK - PASS


##############################
Test: CheckTestRunner: Setup - PASS


##############################
Test: CheckTestRunner: l2cap-tester - PASS
Total: 40, Passed: 34 (85.0%), Failed: 0, Not Run: 6

##############################
Test: CheckTestRunner: bnep-tester - PASS
Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0

##############################
Test: CheckTestRunner: mgmt-tester - PASS
Total: 416, Passed: 402 (96.6%), Failed: 0, Not Run: 14

##############################
Test: CheckTestRunner: rfcomm-tester - PASS
Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0

##############################
Test: CheckTestRunner: sco-tester - PASS
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0

##############################
Test: CheckTestRunner: smp-tester - PASS
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0

##############################
Test: CheckTestRunner: userchan-tester - PASS
Total: 3, Passed: 3 (100.0%), Failed: 0, Not Run: 0



---
Regards,
Linux Bluetooth
Marcel Holtmann May 26, 2021, 3:14 p.m. UTC | #2
Hi Zijun,

> if boardID is 0, will use the default nvm file without surfix.
> 
> Signed-off-by: Tim Jiang <tjiang@codeaurora.org>
> ---
> drivers/bluetooth/btusb.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index 6f25337..61afea9 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -4138,9 +4138,14 @@ 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 (le16_to_cpu(ver->board_id) == 0x0) { //if boardid equal 0, use default nvm.

this comment style is not acceptable.

> +			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));

Regards

Marcel
diff mbox series

Patch

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 6f25337..61afea9 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -4138,9 +4138,14 @@  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 (le16_to_cpu(ver->board_id) == 0x0) { //if boardid equal 0, use default nvm.
+			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));