From 589b80b654588ab19117e45097772e85e45dd1bb Mon Sep 17 00:00:00 2001 From: Zijun Hu Date: Tue, 15 Sep 2026 19:17:17 -0700 Subject: [PATCH] Bluetooth: btnxpuart: Simplify nxp_recv_acl_pkt() by hci_acl_handle() 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 Signed-off-by: Zijun Hu Signed-off-by: Luiz Augusto von Dentz --- 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 4e23d71d00e8..5c730e336114 100644 --- a/drivers/bluetooth/btnxpuart.c +++ b/drivers/bluetooth/btnxpuart.c @@ -1407,10 +1407,8 @@ static int nxp_process_fw_dump(struct hci_dev *hdev, struct sk_buff *skb) 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);