Bluetooth: btusb: Simplify btusb_recv_bulk() by hci_acl_dlen()

Simplify btusb_recv_bulk() by using hci_acl_dlen() instead of:

__le16 dlen = hci_acl_hdr(skb)->dlen;
... __le16_to_cpu(dlen) ...

Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Zijun Hu
2026-07-25 01:54:46 -07:00
committed by Luiz Augusto von Dentz
parent b1ffea37f7
commit 16ca59d36b

View File

@@ -1379,10 +1379,8 @@ static int btusb_recv_bulk(struct btusb_data *data, void *buffer, int count)
hci_skb_expect(skb) -= len;
if (skb->len == HCI_ACL_HDR_SIZE) {
__le16 dlen = hci_acl_hdr(skb)->dlen;
/* Complete ACL header */
hci_skb_expect(skb) = __le16_to_cpu(dlen);
hci_skb_expect(skb) = hci_acl_dlen(skb);
if (skb_tailroom(skb) < hci_skb_expect(skb)) {
kfree_skb(skb);