From: Joonhoe Kim <26rote@gmail.com>
To: marcel@holtmann.org, luiz.dentz@gmail.com
Cc: brgl@kernel.org, johan@kernel.org, loic.poulain@oss.qualcomm.com,
linux-bluetooth@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: [PATCH] Bluetooth: qca: check the device address on every setup
Date: Fri, 16 Oct 2026 21:46:15 +0900 [thread overview]
Message-ID: <20261016124615.61-1-26rote@gmail.com> (raw)
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
next reply other threads:[~2026-10-16 12:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 12:46 Joonhoe Kim [this message]
2026-10-16 14:54 ` Bluetooth: qca: check the device address on every setup bluez.test.bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261016124615.61-1-26rote@gmail.com \
--to=26rote@gmail.com \
--cc=brgl@kernel.org \
--cc=johan@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.