summaryrefslogtreecommitdiff
path: root/net/bluetooth/l2cap_sock.c
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2011-05-16 17:57:22 -0300
committerJaikumar Ganesh <jaikumar@google.com>2011-07-11 11:59:19 -0700
commit162025cbf7cbbc3c43d9a3bcc0975f8de4cccc42 (patch)
treef9b8b6f1da0ae206cf78ef750223313c854887e8 /net/bluetooth/l2cap_sock.c
parentb090c4b586097e4bfdb2dcd7b203db960e783a95 (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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 4050edeaf78..28cdc7e6df5 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)
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)