* [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 v2 1/3] Bluetooth: hci_qca: Replace HCI_VENDOR_PKT usage with HCI_EV_VENDOR
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 ` 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
` (2 subsequent siblings)
3 siblings, 1 reply; 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
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.
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
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* [PATCH v2 2/3] Bluetooth: btusb: QCA: Replace HCI_VENDOR_PKT usages with HCI_EV_VENDOR
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 10:14 ` 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
3 siblings, 0 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
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 f7cce0cf472e..3847a0f6d096 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3278,7 +3278,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));
@@ -3304,7 +3304,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] 7+ messages in thread
* [PATCH v2 3/3] Bluetooth: btusb: Realtek: Replace HCI_VENDOR_PKT usage with HCI_EV_VENDOR
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 10:14 ` [PATCH v2 2/3] Bluetooth: btusb: QCA: " Zijun Hu
@ 2026-07-21 10:14 ` Zijun Hu
2026-07-21 19:40 ` [PATCH v2 0/3] Bluetooth: Replace HCI_VENDOR_PKT usages " patchwork-bot+bluetooth
3 siblings, 0 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
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 3847a0f6d096..4d59b28ab30f 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2800,7 +2800,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->len >= HCI_EVENT_HDR_SIZE + 1 &&
- skb->data[0] == HCI_VENDOR_PKT &&
+ 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] 7+ messages in thread* Re: [PATCH v2 0/3] Bluetooth: Replace HCI_VENDOR_PKT usages with HCI_EV_VENDOR
2026-07-21 10:14 [PATCH v2 0/3] Bluetooth: Replace HCI_VENDOR_PKT usages with HCI_EV_VENDOR Zijun Hu
` (2 preceding siblings ...)
2026-07-21 10:14 ` [PATCH v2 3/3] Bluetooth: btusb: Realtek: Replace HCI_VENDOR_PKT usage " Zijun Hu
@ 2026-07-21 19:40 ` patchwork-bot+bluetooth
3 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+bluetooth @ 2026-07-21 19:40 UTC (permalink / raw)
To: Zijun Hu
Cc: brgl, marcel, luiz.dentz, zijun_hu, linux-arm-msm,
linux-bluetooth, linux-kernel, bartosz.golaszewski
Hello:
This series was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Tue, 21 Jul 2026 03:14:39 -0700 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [v2,1/3] Bluetooth: hci_qca: Replace HCI_VENDOR_PKT usage with HCI_EV_VENDOR
https://git.kernel.org/bluetooth/bluetooth-next/c/235a0cffba9b
- [v2,2/3] Bluetooth: btusb: QCA: Replace HCI_VENDOR_PKT usages with HCI_EV_VENDOR
https://git.kernel.org/bluetooth/bluetooth-next/c/90ae39404c94
- [v2,3/3] Bluetooth: btusb: Realtek: Replace HCI_VENDOR_PKT usage with HCI_EV_VENDOR
https://git.kernel.org/bluetooth/bluetooth-next/c/6f55ad8fb0ac
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ 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