From: Zijun Hu <zijun.hu@oss.qualcomm.com>
To: Marcel Holtmann <marcel@holtmann.org>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
Rocky Liao <quic_rjliao@quicinc.com>,
Bartosz Golaszewski <brgl@kernel.org>,
Ben Young Tae Kim <ytkim@qca.qualcomm.com>,
Balakrishna Godavarthi <quic_bgodavar@quicinc.com>,
Matthias Kaehlcke <mka@chromium.org>,
Tim Jiang <quic_tjiang@quicinc.com>
Cc: Zijun Hu <zijun_hu@icloud.com>,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>,
linux-arm-msm@vger.kernel.org,
Zijun Hu <zijun.hu@oss.qualcomm.com>,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: [PATCH v2 01/12] Bluetooth: btqca: Fix qca_set_bdaddr() waiting for wrong HCI event
Date: Thu, 25 Jun 2026 22:19:46 -0700 [thread overview]
Message-ID: <20260625-bt_bugfix-v2-1-93396a6f7d5e@oss.qualcomm.com> (raw)
In-Reply-To: <20260625-bt_bugfix-v2-0-93396a6f7d5e@oss.qualcomm.com>
qca_set_bdaddr() waits for HCI_EV_VENDOR when sending
EDL_WRITE_BD_ADDR_OPCODE (0xFC14), but the controller responds with
Command Complete event as confirmed by btmon on WCN7850:
< HCI Command: Vendor (0x3f|0x0014) plen 6 #3 [hci0]
11 22 33 44 55 66
> HCI Event: Command Complete (0x0e) plen 4 #4 [hci0]
Vendor (0x3f|0x0014) ncmd 1
Status: Success (0x00)
Fix by passing 0 as the event parameter to __hci_cmd_sync_ev() to
wait for the command complete event instead.
Fixes: 5c0a1001c8be ("Bluetooth: hci_qca: Add helper to set device address")
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
---
drivers/bluetooth/btqca.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
index 04ebe290bc78..27f03690af54 100644
--- a/drivers/bluetooth/btqca.c
+++ b/drivers/bluetooth/btqca.c
@@ -1029,8 +1029,7 @@ int qca_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
baswap(&bdaddr_swapped, bdaddr);
skb = __hci_cmd_sync_ev(hdev, EDL_WRITE_BD_ADDR_OPCODE, 6,
- &bdaddr_swapped, HCI_EV_VENDOR,
- HCI_INIT_TIMEOUT);
+ &bdaddr_swapped, 0, HCI_INIT_TIMEOUT);
if (IS_ERR(skb)) {
err = PTR_ERR(skb);
bt_dev_err(hdev, "QCA Change address cmd failed (%d)", err);
--
2.34.1
next prev parent reply other threads:[~2026-06-26 5:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 5:19 [PATCH v2 00/12] Bluetooth: btusb/btqca/hci_sync: Clean up btusb and fix several bugs Zijun Hu
2026-06-26 5:19 ` Zijun Hu [this message]
2026-06-26 8:39 ` bluez.test.bot
2026-06-26 5:19 ` [PATCH v2 02/12] Bluetooth: btusb: Fix BD_ADDR byte order in btusb_set_bdaddr_wcn6855() Zijun Hu
2026-06-26 5:19 ` [PATCH v2 03/12] Bluetooth: btusb: Record matched usb_device_id into btusb_data Zijun Hu
2026-06-26 5:19 ` [PATCH v2 04/12] Bluetooth: btusb: QCA: Fix populating devcoredump fields on unenabled devices Zijun Hu
2026-06-26 5:19 ` [PATCH v2 05/12] Bluetooth: btusb: QCA: move qca_dump out of struct btusb_data Zijun Hu
2026-06-26 5:19 ` [PATCH v2 06/12] Bluetooth: hci_sync: Introduce __hci_reset_sync() for device drivers Zijun Hu
2026-06-26 5:19 ` [PATCH v2 07/12] Bluetooth: btqca: Simplify qca_send_reset() by using __hci_reset_sync() Zijun Hu
2026-06-26 5:19 ` [PATCH v2 08/12] Bluetooth: btusb: Simplify btusb_shutdown_qca() " Zijun Hu
2026-06-26 5:19 ` [PATCH v2 09/12] Bluetooth: hci_sync: Simplify hci_reset_sync() Zijun Hu
2026-06-26 5:19 ` [PATCH v2 10/12] Bluetooth: hci_event: Log error for HCI reset status error in hci_cc_reset() Zijun Hu
2026-06-30 14:43 ` Bartosz Golaszewski
2026-06-26 5:19 ` [PATCH v2 11/12] Bluetooth: btusb: Reduce a redundant assignment in btusb_probe() Zijun Hu
2026-06-26 5:19 ` [PATCH v2 12/12] Bluetooth: btusb: Use & instead of == to test bitflag BTUSB_IGNORE Zijun Hu
2026-06-30 20:32 ` [PATCH v2 00/12] Bluetooth: btusb/btqca/hci_sync: Clean up btusb and fix several bugs patchwork-bot+bluetooth
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=20260625-bt_bugfix-v2-1-93396a6f7d5e@oss.qualcomm.com \
--to=zijun.hu@oss.qualcomm.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=luiz.von.dentz@intel.com \
--cc=marcel@holtmann.org \
--cc=mka@chromium.org \
--cc=quic_bgodavar@quicinc.com \
--cc=quic_rjliao@quicinc.com \
--cc=quic_tjiang@quicinc.com \
--cc=ytkim@qca.qualcomm.com \
--cc=zijun_hu@icloud.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox