Lines Matching refs:skb
17 int (*recv)(struct hci_dev *hdev, struct sk_buff *skb);
42 struct sk_buff *skb, in h4_recv_buf() argument
49 if (IS_ERR(skb)) in h4_recv_buf()
50 skb = NULL; in h4_recv_buf()
55 if (!skb) { in h4_recv_buf()
60 skb = bt_skb_alloc((&pkts[i])->maxlen, in h4_recv_buf()
62 if (!skb) in h4_recv_buf()
65 hci_skb_pkt_type(skb) = (&pkts[i])->type; in h4_recv_buf()
66 hci_skb_expect(skb) = (&pkts[i])->hlen; in h4_recv_buf()
71 if (!skb) in h4_recv_buf()
78 len = min_t(uint, hci_skb_expect(skb) - skb->len, count); in h4_recv_buf()
79 skb_put_data(skb, buffer, len); in h4_recv_buf()
85 if (skb->len < hci_skb_expect(skb)) in h4_recv_buf()
89 if (hci_skb_pkt_type(skb) == (&pkts[i])->type) in h4_recv_buf()
94 kfree_skb(skb); in h4_recv_buf()
98 if (skb->len == (&pkts[i])->hlen) { in h4_recv_buf()
108 dlen = skb->data[(&pkts[i])->loff]; in h4_recv_buf()
109 hci_skb_expect(skb) += dlen; in h4_recv_buf()
111 if (skb_tailroom(skb) < dlen) { in h4_recv_buf()
112 kfree_skb(skb); in h4_recv_buf()
118 dlen = get_unaligned_le16(skb->data + in h4_recv_buf()
120 hci_skb_expect(skb) += dlen; in h4_recv_buf()
122 if (skb_tailroom(skb) < dlen) { in h4_recv_buf()
123 kfree_skb(skb); in h4_recv_buf()
129 kfree_skb(skb); in h4_recv_buf()
135 (&pkts[i])->recv(hdev, skb); in h4_recv_buf()
136 skb = NULL; in h4_recv_buf()
140 (&pkts[i])->recv(hdev, skb); in h4_recv_buf()
141 skb = NULL; in h4_recv_buf()
145 return skb; in h4_recv_buf()