From: Zijun Hu <zijun.hu@oss.qualcomm.com>
To: Amitkumar Karwar <amitkumar.karwar@nxp.com>,
Neeraj Kale <neeraj.sanjaykale@nxp.com>,
Marcel Holtmann <marcel@holtmann.org>,
Luiz Augusto von Dentz <luiz.dentz@gmail.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>,
Zijun Hu <zijun.hu@oss.qualcomm.com>
Subject: [PATCH v3 1/2] Bluetooth: btnxpuart: Simplify nxp_recv_acl_pkt() by hci_acl_handle()
Date: Tue, 15 Sep 2026 19:17:17 -0700 [thread overview]
Message-ID: <20260915-misc_fix-v3-1-31fab8976ac1@oss.qualcomm.com> (raw)
In-Reply-To: <20260915-misc_fix-v3-0-31fab8976ac1@oss.qualcomm.com>
Simplify nxp_recv_acl_pkt() by using hci_acl_handle() instead of:
__u16 handle = __le16_to_cpu(hci_acl_hdr(skb)->handle);
... (handle & 0x0FFF) ...
Reviewed-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
---
drivers/bluetooth/btnxpuart.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
index 25e7b41b349f..b975a00eb6f8 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -1400,20 +1400,18 @@ static int nxp_process_fw_dump(struct hci_dev *hdev, struct sk_buff *skb)
free_skb:
kfree_skb(skb);
return 0;
}
static int nxp_recv_acl_pkt(struct hci_dev *hdev, struct sk_buff *skb)
{
- __u16 handle = __le16_to_cpu(hci_acl_hdr(skb)->handle);
-
/* FW dump chunks are ACL packets with conn handle 0xfff */
- if ((handle & 0x0FFF) == 0xFFF)
+ if (hci_acl_handle(skb) == 0xFFF)
return nxp_process_fw_dump(hdev, skb);
else
return hci_recv_frame(hdev, skb);
}
static int nxp_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
{
union nxp_set_bd_addr_payload pcmd;
--
2.34.1
next prev parent reply other threads:[~2026-09-16 2:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 2:17 [PATCH v3 0/2] Bluetooth: btnxpuart: Simplify ACL handling and fix skb leak Zijun Hu
2026-09-16 2:17 ` Zijun Hu [this message]
2026-09-16 2:17 ` [PATCH v3 2/2] Bluetooth: btnxpuart: Fix skb leak in nxp_process_fw_dump() Zijun Hu
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=20260915-misc_fix-v3-1-31fab8976ac1@oss.qualcomm.com \
--to=zijun.hu@oss.qualcomm.com \
--cc=amitkumar.karwar@nxp.com \
--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=neeraj.sanjaykale@nxp.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
all inboxes | Powered by JetHome®