l2cap_sock.c (bd4b165312bacbf1e732cbc22c141362cfb5fda3) | l2cap_sock.c (9033894722ec595053c92bfa4359b37e7bc91b78) |
---|---|
1/* 2 BlueZ - Bluetooth protocol stack for Linux 3 Copyright (C) 2000-2001 Qualcomm Incorporated 4 Copyright (C) 2009-2010 Gustavo F. Padovan <gustavo@padovan.org> 5 Copyright (C) 2010 Google Inc. 6 Copyright (C) 2011 ProFUSION Embedded Systems 7 8 Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> --- 913 unchanged lines hidden (view full) --- 922static void l2cap_sock_state_change_cb(void *data, int state) 923{ 924 struct sock *sk = data; 925 926 sk->sk_state = state; 927} 928 929static struct sk_buff *l2cap_sock_alloc_skb_cb(struct l2cap_chan *chan, | 1/* 2 BlueZ - Bluetooth protocol stack for Linux 3 Copyright (C) 2000-2001 Qualcomm Incorporated 4 Copyright (C) 2009-2010 Gustavo F. Padovan <gustavo@padovan.org> 5 Copyright (C) 2010 Google Inc. 6 Copyright (C) 2011 ProFUSION Embedded Systems 7 8 Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> --- 913 unchanged lines hidden (view full) --- 922static void l2cap_sock_state_change_cb(void *data, int state) 923{ 924 struct sock *sk = data; 925 926 sk->sk_state = state; 927} 928 929static struct sk_buff *l2cap_sock_alloc_skb_cb(struct l2cap_chan *chan, |
930 unsigned long len, int nb, 931 int *err) | 930 unsigned long len, int nb) |
932{ | 931{ |
933 struct sock *sk = chan->sk; | 932 struct sk_buff *skb; 933 int err; |
934 | 934 |
935 return bt_skb_send_alloc(sk, len, nb, err); | 935 skb = bt_skb_send_alloc(chan->sk, len, nb, &err); 936 if (!skb) 937 return ERR_PTR(err); 938 939 return skb; |
936} 937 938static struct l2cap_ops l2cap_chan_ops = { 939 .name = "L2CAP Socket Interface", 940 .new_connection = l2cap_sock_new_connection_cb, 941 .recv = l2cap_sock_recv_cb, 942 .close = l2cap_sock_close_cb, 943 .state_change = l2cap_sock_state_change_cb, --- 196 unchanged lines hidden --- | 940} 941 942static struct l2cap_ops l2cap_chan_ops = { 943 .name = "L2CAP Socket Interface", 944 .new_connection = l2cap_sock_new_connection_cb, 945 .recv = l2cap_sock_recv_cb, 946 .close = l2cap_sock_close_cb, 947 .state_change = l2cap_sock_state_change_cb, --- 196 unchanged lines hidden --- |