Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: qca: check the device address on every setup
@ 2026-10-16 12:46 Joonhoe Kim
  2026-10-16 14:54 ` bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Joonhoe Kim @ 2026-10-16 12:46 UTC (permalink / raw)
  To: marcel, luiz.dentz
  Cc: brgl, johan, loic.poulain, linux-bluetooth, linux-arm-msm,
	linux-kernel, stable

qca_check_bdaddr() sets HCI_QUIRK_USE_BDADDR_PROPERTY when the
controller reports the default address from its NVM file, so that the
core programs the configured address again on every setup. The check
is skipped once hdev->public_addr is set.

If the first setup runs on the ROM firmware because the rampatch and NVM
files could not be loaded (driver built in, firmware not in the
initramfs), the check is not reached. Once user space sets the address
with MGMT_OP_SET_PUBLIC_ADDRESS, every later setup skips it, so the
controller falls back to the default address on the next power on and
bonded devices no longer connect. Seen with a WCN7850 on a Lenovo Legion
Tab Y700 Gen 5.

Check the address on every setup. Setting the quirk while
hdev->public_addr is set does not make the controller unconfigured, as
is_configured() only looks at it while no address is set.

Fixes: 32868e126c78 ("Bluetooth: qca: fix invalid device address check")
Cc: stable@vger.kernel.org
Signed-off-by: Joonhoe Kim <26rote@gmail.com>
---
Tested with the WCN7850 over UART: the configured address survives
three power cycles, a bluetoothd restart and an rfkill block/unblock;
without this patch the first power cycle reverts it. The NVMEM BD
address series [1] changes the same branch; the two apply in either
order.

[1] https://lore.kernel.org/all/20261015-block-as-nvmem-v11-6-f890ac74f87d@oss.qualcomm.com/

 drivers/bluetooth/btqca.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
index 22b08ab05b82..756a4a8d5631 100644
--- a/drivers/bluetooth/btqca.c
+++ b/drivers/bluetooth/btqca.c
@@ -686,9 +686,6 @@ static int qca_check_bdaddr(struct hci_dev *hdev, const struct qca_fw_config *co
 	struct sk_buff *skb;
 	int err;
 
-	if (bacmp(&hdev->public_addr, BDADDR_ANY))
-		return 0;
-
 	skb = __hci_cmd_sync(hdev, HCI_OP_READ_BD_ADDR, 0, NULL,
 			     HCI_INIT_TIMEOUT);
 	if (IS_ERR(skb)) {
-- 
2.43.0


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

* RE: Bluetooth: qca: check the device address on every setup
  2026-10-16 12:46 [PATCH] Bluetooth: qca: check the device address on every setup Joonhoe Kim
@ 2026-10-16 14:54 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-10-16 14:54 UTC (permalink / raw)
  To: linux-bluetooth, 26rote

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]

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/series/1187309/

---Test result---

Test Summary:
CheckPatch                    PASS      0.91 seconds
VerifyFixes                   PASS      0.10 seconds
VerifySignedoff               PASS      0.14 seconds
GitLint                       PASS      0.27 seconds
SubjectPrefix                 PASS      0.10 seconds
BuildKernel                   PASS      22.21 seconds
CheckAllWarning               PASS      26.11 seconds
CheckSparse                   PASS      27.67 seconds
BuildKernel32                 PASS      22.39 seconds
CheckKernelLLVM               PASS      26.39 seconds
TestRunnerSetup               PASS      517.15 seconds
IncrementalBuild              PASS      21.33 seconds



https://github.com/bluez/bluetooth-next/pull/957

---
Regards,
Linux Bluetooth


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

end of thread, other threads:[~2026-10-16 14:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-16 12:46 [PATCH] Bluetooth: qca: check the device address on every setup Joonhoe Kim
2026-10-16 14:54 ` bluez.test.bot

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