mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
Bluetooth: add recv() callback to l2cap_chan_ops
This abstracts the call to sock_queue_recv_skb() into l2cap_chan_ops->recv(). Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
This commit is contained in:
parent
80808e431e
commit
2307049422
3 changed files with 17 additions and 8 deletions
|
@ -789,9 +789,17 @@ static struct l2cap_chan *l2cap_sock_new_connection_cb(void *data)
|
|||
return l2cap_pi(sk)->chan;
|
||||
}
|
||||
|
||||
static int l2cap_sock_recv_cb(void *data, struct sk_buff *skb)
|
||||
{
|
||||
struct sock *sk = data;
|
||||
|
||||
return sock_queue_rcv_skb(sk, skb);
|
||||
}
|
||||
|
||||
static struct l2cap_ops l2cap_chan_ops = {
|
||||
.name = "L2CAP Socket Interface",
|
||||
.new_connection = l2cap_sock_new_connection_cb,
|
||||
.recv = l2cap_sock_recv_cb,
|
||||
};
|
||||
|
||||
static void l2cap_sock_destruct(struct sock *sk)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue