Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 0/3] Bluetooth: Replace HCI_VENDOR_PKT usages with HCI_EV_VENDOR
@ 2026-07-17 22:08 Zijun Hu
  2026-07-17 22:08 ` [PATCH 1/3] Bluetooth: hci_qca: Replace HCI_VENDOR_PKT usage " Zijun Hu
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ 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

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>
---
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: bd8bee79e1fa8db2d587733f8b6fd9597b04d6e3
change-id: 20260717-fix_vendor-6f40af4b1c91

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


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

* [PATCH 1/3] Bluetooth: hci_qca: Replace HCI_VENDOR_PKT usage with HCI_EV_VENDOR
  2026-07-17 22:08 [PATCH 0/3] Bluetooth: Replace HCI_VENDOR_PKT usages with HCI_EV_VENDOR Zijun Hu
@ 2026-07-17 22:08 ` Zijun Hu
  2026-07-17 23:27   ` Bluetooth: Replace HCI_VENDOR_PKT usages " bluez.test.bot
  2026-07-17 22:08 ` [PATCH 2/3] Bluetooth: btusb: QCA: " Zijun Hu
  2026-07-17 22:08 ` [PATCH 3/3] Bluetooth: btusb: Realtek: Replace HCI_VENDOR_PKT usage " Zijun Hu
  2 siblings, 1 reply; 5+ 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] 5+ messages in thread

* [PATCH 2/3] Bluetooth: btusb: QCA: Replace HCI_VENDOR_PKT usages with HCI_EV_VENDOR
  2026-07-17 22:08 [PATCH 0/3] Bluetooth: Replace HCI_VENDOR_PKT usages with HCI_EV_VENDOR Zijun Hu
  2026-07-17 22:08 ` [PATCH 1/3] Bluetooth: hci_qca: Replace HCI_VENDOR_PKT usage " Zijun Hu
@ 2026-07-17 22:08 ` Zijun Hu
  2026-07-17 22:08 ` [PATCH 3/3] Bluetooth: btusb: Realtek: Replace HCI_VENDOR_PKT usage " Zijun Hu
  2 siblings, 0 replies; 5+ 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

These usages of HCI_VENDOR_PKT are 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/btusb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 4c3193ec2d52..d69eec8b2911 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3276,7 +3276,7 @@ static bool acl_pkt_is_dump_qca(struct hci_dev *hdev, struct sk_buff *skb)
 		goto out;
 
 	event_hdr = skb_pull_data(clone, sizeof(*event_hdr));
-	if (!event_hdr || (event_hdr->evt != HCI_VENDOR_PKT))
+	if (!event_hdr || event_hdr->evt != HCI_EV_VENDOR)
 		goto out;
 
 	dump_hdr = skb_pull_data(clone, sizeof(*dump_hdr));
@@ -3302,7 +3302,7 @@ static bool evt_pkt_is_dump_qca(struct hci_dev *hdev, struct sk_buff *skb)
 		return false;
 
 	event_hdr = skb_pull_data(clone, sizeof(*event_hdr));
-	if (!event_hdr || (event_hdr->evt != HCI_VENDOR_PKT))
+	if (!event_hdr || event_hdr->evt != HCI_EV_VENDOR)
 		goto out;
 
 	dump_hdr = skb_pull_data(clone, sizeof(*dump_hdr));

-- 
2.34.1


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

* [PATCH 3/3] Bluetooth: btusb: Realtek: Replace HCI_VENDOR_PKT usage with HCI_EV_VENDOR
  2026-07-17 22:08 [PATCH 0/3] Bluetooth: Replace HCI_VENDOR_PKT usages with HCI_EV_VENDOR Zijun Hu
  2026-07-17 22:08 ` [PATCH 1/3] Bluetooth: hci_qca: Replace HCI_VENDOR_PKT usage " Zijun Hu
  2026-07-17 22:08 ` [PATCH 2/3] Bluetooth: btusb: QCA: " Zijun Hu
@ 2026-07-17 22:08 ` Zijun Hu
  2 siblings, 0 replies; 5+ 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.

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

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index d69eec8b2911..6973daab91ec 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2799,7 +2799,7 @@ static int btusb_setup_realtek(struct hci_dev *hdev)
 
 static int btusb_recv_event_realtek(struct hci_dev *hdev, struct sk_buff *skb)
 {
-	if (skb->data[0] == HCI_VENDOR_PKT && skb->data[2] == RTK_SUB_EVENT_CODE_COREDUMP) {
+	if (skb->data[0] == HCI_EV_VENDOR && skb->data[2] == RTK_SUB_EVENT_CODE_COREDUMP) {
 		struct rtk_dev_coredump_hdr hdr = {
 			.code = RTK_DEVCOREDUMP_CODE_MEMDUMP,
 		};

-- 
2.34.1


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

* RE: Bluetooth: Replace HCI_VENDOR_PKT usages with HCI_EV_VENDOR
  2026-07-17 22:08 ` [PATCH 1/3] Bluetooth: hci_qca: Replace HCI_VENDOR_PKT usage " Zijun Hu
@ 2026-07-17 23:27   ` bluez.test.bot
  0 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2026-07-17 23:27 UTC (permalink / raw)
  To: linux-bluetooth, zijun.hu

[-- Attachment #1: Type: text/plain, Size: 1181 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/project/bluetooth/list/?series=1129860

---Test result---

Test Summary:
CheckPatch                    PASS      1.75 seconds
VerifyFixes                   PASS      0.15 seconds
VerifySignedoff               PASS      0.20 seconds
GitLint                       PASS      0.98 seconds
SubjectPrefix                 PASS      0.30 seconds
BuildKernel                   PASS      24.91 seconds
CheckAllWarning               PASS      27.22 seconds
CheckSparse                   PASS      26.01 seconds
BuildKernel32                 PASS      23.86 seconds
CheckKernelLLVM               SKIP      0.00 seconds
TestRunnerSetup               PASS      453.70 seconds
IncrementalBuild              PASS      28.93 seconds

Details
##############################
Test: CheckKernelLLVM - SKIP
Desc: Build kernel with LLVM + context analysis
Output:
Clang not found


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

---
Regards,
Linux Bluetooth


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

end of thread, other threads:[~2026-07-17 23:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-17 22:08 [PATCH 0/3] Bluetooth: Replace HCI_VENDOR_PKT usages with HCI_EV_VENDOR Zijun Hu
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
2026-07-17 22:08 ` [PATCH 2/3] Bluetooth: btusb: QCA: " Zijun Hu
2026-07-17 22:08 ` [PATCH 3/3] Bluetooth: btusb: Realtek: Replace HCI_VENDOR_PKT usage " Zijun Hu

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