diff options
| author | Zijun Hu <zijun.hu@oss.qualcomm.com> | 2026-07-25 01:54:44 -0700 |
|---|---|---|
| committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2026-08-07 15:38:31 -0400 |
| commit | 22fd0fbcf720a99acdd2bef66d57f4f3c95ed9cb (patch) | |
| tree | 8e80b52bbdfb2631703d3b6a4041d5c459679f72 /include | |
| parent | 33971338ef4c5e596bf402b63fb61e3aae1ec6a2 (diff) | |
| download | linux-stable-22fd0fbcf720a99acdd2bef66d57f4f3c95ed9cb.tar.gz linux-stable-22fd0fbcf720a99acdd2bef66d57f4f3c95ed9cb.zip | |
Bluetooth: hci: Introduce hci_acl_handle() and hci_acl_dlen() helpers
Introduce both helpers for ACL packet since:
both core and transport drivers extract the handle and data length
from its header in several places.
Both will be used later.
Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/bluetooth/hci.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 50f0eef71fb1..d557bdf9ae57 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -3407,6 +3407,16 @@ static inline struct hci_iso_hdr *hci_iso_hdr(const struct sk_buff *skb) #define hci_handle(h) (h & 0x0fff) #define hci_flags(h) (h >> 12) +static inline __u16 hci_acl_handle(const struct sk_buff *skb) +{ + return hci_handle(__le16_to_cpu(hci_acl_hdr(skb)->handle)); +} + +static inline __u16 hci_acl_dlen(const struct sk_buff *skb) +{ + return __le16_to_cpu(hci_acl_hdr(skb)->dlen); +} + /* ISO handle and flags pack/unpack */ #define hci_iso_flags_pb(f) (f & 0x0003) #define hci_iso_flags_ts(f) ((f >> 2) & 0x0001) |
