Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Bluetooth: Replace HCI_VENDOR_PKT usages with HCI_EV_VENDOR
@ 2026-07-21 10:14 Zijun Hu
  2026-07-21 10:14 ` [PATCH v2 1/3] Bluetooth: hci_qca: Replace HCI_VENDOR_PKT usage " Zijun Hu
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Zijun Hu @ 2026-07-21 10:14 UTC (permalink / raw)
  To: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz
  Cc: Zijun Hu, linux-arm-msm, linux-bluetooth, linux-kernel, Zijun Hu,
	Bartosz Golaszewski

The macros below have different meanings even though they share the
same value 0xff:

 HCI_VENDOR_PKT: HCI packet indicator or type
 HCI_EV_VENDOR:  event code of a VSE

several usage of HCI_VENDOR_PKT is wrongly checking an event code.

Fix by using HCI_EV_VENDOR for event code.

Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
---
Changes in v2:
- Rebase and fix conflict for the last commit
- Link to v1: https://lore.kernel.org/r/20260717-fix_vendor-v1-0-f22263c1175b@oss.qualcomm.com

To: Bartosz Golaszewski <brgl@kernel.org>
To: Marcel Holtmann <marcel@holtmann.org>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Zijun Hu <zijun_hu@icloud.com>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-bluetooth@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

---
Zijun Hu (3):
      Bluetooth: hci_qca: Replace HCI_VENDOR_PKT usage with HCI_EV_VENDOR
      Bluetooth: btusb: QCA: Replace HCI_VENDOR_PKT usages with HCI_EV_VENDOR
      Bluetooth: btusb: Realtek: Replace HCI_VENDOR_PKT usage with HCI_EV_VENDOR

 drivers/bluetooth/btusb.c   | 6 +++---
 drivers/bluetooth/hci_qca.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
---
base-commit: 891916abe16fc409d6e600ddd41b86ecd8f5a9df
change-id: 20260717-fix_vendor-6f40af4b1c91

Best regards,
--  
Zijun Hu <zijun.hu@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH 1/3] Bluetooth: hci_qca: Replace HCI_VENDOR_PKT usage with HCI_EV_VENDOR
@ 2026-07-17 22:08 Zijun Hu
  2026-07-17 23:27 ` Bluetooth: Replace HCI_VENDOR_PKT usages " bluez.test.bot
  0 siblings, 1 reply; 7+ messages in thread
From: Zijun Hu @ 2026-07-17 22:08 UTC (permalink / raw)
  To: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz
  Cc: Zijun Hu, linux-arm-msm, linux-bluetooth, linux-kernel, Zijun Hu

The macros below have different meanings even though they share the
same value 0xff:

  HCI_VENDOR_PKT: HCI packet indicator or type
  HCI_EV_VENDOR:  event code of a VSE

This usage of HCI_VENDOR_PKT is wrongly checking an event code.

Fix by using HCI_EV_VENDOR for event code.
Also fix warning "CHECK: Unnecessary parentheses around comparison"
given by checkpatch.pl.

Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
---
 drivers/bluetooth/hci_qca.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index bd29d422c209..f978087612ee 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1240,8 +1240,8 @@ static int qca_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
 	 * received we store dump into a file before closing hci. This
 	 * dump will help in triaging the issues.
 	 */
-	if ((skb->data[0] == HCI_VENDOR_PKT) &&
-	    (get_unaligned_be16(skb->data + 2) == QCA_SSR_DUMP_HANDLE))
+	if (skb->data[0] == HCI_EV_VENDOR &&
+	    get_unaligned_be16(skb->data + 2) == QCA_SSR_DUMP_HANDLE)
 		return qca_controller_memdump_event(hdev, skb);
 
 	return hci_recv_frame(hdev, skb);

-- 
2.34.1


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

end of thread, other threads:[~2026-07-21 19:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-21 10:14 [PATCH v2 0/3] Bluetooth: Replace HCI_VENDOR_PKT usages with HCI_EV_VENDOR Zijun Hu
2026-07-21 10:14 ` [PATCH v2 1/3] Bluetooth: hci_qca: Replace HCI_VENDOR_PKT usage " Zijun Hu
2026-07-21 11:19   ` Bluetooth: Replace HCI_VENDOR_PKT usages " bluez.test.bot
2026-07-21 10:14 ` [PATCH v2 2/3] Bluetooth: btusb: QCA: " Zijun Hu
2026-07-21 10:14 ` [PATCH v2 3/3] Bluetooth: btusb: Realtek: Replace HCI_VENDOR_PKT usage " Zijun Hu
2026-07-21 19:40 ` [PATCH v2 0/3] Bluetooth: Replace HCI_VENDOR_PKT usages " patchwork-bot+bluetooth
  -- strict thread matches above, loose matches on Subject: below --
2026-07-17 22:08 [PATCH 1/3] Bluetooth: hci_qca: Replace HCI_VENDOR_PKT usage " Zijun Hu
2026-07-17 23:27 ` Bluetooth: Replace HCI_VENDOR_PKT usages " 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