diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-05-16 16:57:22 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-06-13 13:55:33 -0400 |
commit | 230704942283cb3990584ddd6955ac8decfa6a2c (patch) | |
tree | 2834efce3cf32e1f6de9cedb7ee510e70eb662da /net/bluetooth/l2cap_sock.c | |
parent | 80808e431e1ef25856457de82ce141bed6a6313a (diff) |
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>
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-rw-r--r-- | net/bluetooth/l2cap_sock.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index 4050edeaf78b..28cdc7e6df54 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c | |||
@@ -789,9 +789,17 @@ static struct l2cap_chan *l2cap_sock_new_connection_cb(void *data) | |||
789 | return l2cap_pi(sk)->chan; | 789 | return l2cap_pi(sk)->chan; |
790 | } | 790 | } |
791 | 791 | ||
792 | static int l2cap_sock_recv_cb(void *data, struct sk_buff *skb) | ||
793 | { | ||
794 | struct sock *sk = data; | ||
795 | |||
796 | return sock_queue_rcv_skb(sk, skb); | ||
797 | } | ||
798 | |||
792 | static struct l2cap_ops l2cap_chan_ops = { | 799 | static struct l2cap_ops l2cap_chan_ops = { |
793 | .name = "L2CAP Socket Interface", | 800 | .name = "L2CAP Socket Interface", |
794 | .new_connection = l2cap_sock_new_connection_cb, | 801 | .new_connection = l2cap_sock_new_connection_cb, |
802 | .recv = l2cap_sock_recv_cb, | ||
795 | }; | 803 | }; |
796 | 804 | ||
797 | static void l2cap_sock_destruct(struct sock *sk) | 805 | static void l2cap_sock_destruct(struct sock *sk) |