Bluetooth: Add alloc_skb chan operator
Add channel-specific skb allocation method Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:

committed by
Johan Hedberg

parent
d22015aad4
commit
2f7719ce54
@@ -899,12 +899,21 @@ static void l2cap_sock_state_change_cb(void *data, int state)
|
||||
sk->sk_state = state;
|
||||
}
|
||||
|
||||
static struct sk_buff *l2cap_sock_alloc_skb_cb(struct l2cap_chan *chan,
|
||||
unsigned long len, int nb, int *err)
|
||||
{
|
||||
struct sock *sk = chan->sk;
|
||||
|
||||
return bt_skb_send_alloc(sk, len, nb, err);
|
||||
}
|
||||
|
||||
static struct l2cap_ops l2cap_chan_ops = {
|
||||
.name = "L2CAP Socket Interface",
|
||||
.new_connection = l2cap_sock_new_connection_cb,
|
||||
.recv = l2cap_sock_recv_cb,
|
||||
.close = l2cap_sock_close_cb,
|
||||
.state_change = l2cap_sock_state_change_cb,
|
||||
.alloc_skb = l2cap_sock_alloc_skb_cb,
|
||||
};
|
||||
|
||||
static void l2cap_sock_destruct(struct sock *sk)
|
||||
|
Reference in New Issue
Block a user