aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r--net/bluetooth/l2cap.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index f8c25d500155..e83ee82440d3 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -1,4 +1,4 @@
1/* 1/*
2 BlueZ - Bluetooth protocol stack for Linux 2 BlueZ - Bluetooth protocol stack for Linux
3 Copyright (C) 2000-2001 Qualcomm Incorporated 3 Copyright (C) 2000-2001 Qualcomm Incorporated
4 4
@@ -12,13 +12,13 @@
12 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 12 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. 13 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
14 IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY 14 IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
15 CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES 15 CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
16 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 16 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 17 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 19
20 ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, 20 ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
21 COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS 21 COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
22 SOFTWARE IS DISCLAIMED. 22 SOFTWARE IS DISCLAIMED.
23*/ 23*/
24 24
@@ -227,7 +227,7 @@ static void __l2cap_chan_add(struct l2cap_conn *conn, struct sock *sk, struct so
227 bt_accept_enqueue(parent, sk); 227 bt_accept_enqueue(parent, sk);
228} 228}
229 229
230/* Delete channel. 230/* Delete channel.
231 * Must be called on the locked socket. */ 231 * Must be called on the locked socket. */
232static void l2cap_chan_del(struct sock *sk, int err) 232static void l2cap_chan_del(struct sock *sk, int err)
233{ 233{
@@ -238,7 +238,7 @@ static void l2cap_chan_del(struct sock *sk, int err)
238 238
239 BT_DBG("sk %p, conn %p, err %d", sk, conn, err); 239 BT_DBG("sk %p, conn %p, err %d", sk, conn, err);
240 240
241 if (conn) { 241 if (conn) {
242 /* Unlink from channel list */ 242 /* Unlink from channel list */
243 l2cap_chan_unlink(&conn->chan_list, sk); 243 l2cap_chan_unlink(&conn->chan_list, sk);
244 l2cap_pi(sk)->conn = NULL; 244 l2cap_pi(sk)->conn = NULL;
@@ -590,7 +590,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_
590 err = -EACCES; 590 err = -EACCES;
591 goto done; 591 goto done;
592 } 592 }
593 593
594 write_lock_bh(&l2cap_sk_list.lock); 594 write_lock_bh(&l2cap_sk_list.lock);
595 595
596 if (la->l2_psm && __l2cap_get_sock_by_addr(la->l2_psm, &la->l2_bdaddr)) { 596 if (la->l2_psm && __l2cap_get_sock_by_addr(la->l2_psm, &la->l2_bdaddr)) {
@@ -890,7 +890,7 @@ static inline int l2cap_do_send(struct sock *sk, struct msghdr *msg, int len)
890 *frag = bt_skb_send_alloc(sk, count, msg->msg_flags & MSG_DONTWAIT, &err); 890 *frag = bt_skb_send_alloc(sk, count, msg->msg_flags & MSG_DONTWAIT, &err);
891 if (!*frag) 891 if (!*frag)
892 goto fail; 892 goto fail;
893 893
894 if (memcpy_fromiovec(skb_put(*frag, count), msg->msg_iov, count)) { 894 if (memcpy_fromiovec(skb_put(*frag, count), msg->msg_iov, count)) {
895 err = -EFAULT; 895 err = -EFAULT;
896 goto fail; 896 goto fail;
@@ -1267,7 +1267,7 @@ static inline int l2cap_get_conf_opt(void **ptr, int *type, int *olen, unsigned
1267 1267
1268static inline void l2cap_parse_conf_req(struct sock *sk, void *data, int len) 1268static inline void l2cap_parse_conf_req(struct sock *sk, void *data, int len)
1269{ 1269{
1270 int type, hint, olen; 1270 int type, hint, olen;
1271 unsigned long val; 1271 unsigned long val;
1272 void *ptr = data; 1272 void *ptr = data;
1273 1273
@@ -1414,7 +1414,7 @@ static inline int l2cap_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hd
1414 1414
1415 /* Check for backlog size */ 1415 /* Check for backlog size */
1416 if (sk_acceptq_is_full(parent)) { 1416 if (sk_acceptq_is_full(parent)) {
1417 BT_DBG("backlog full %d", parent->sk_ack_backlog); 1417 BT_DBG("backlog full %d", parent->sk_ack_backlog);
1418 goto response; 1418 goto response;
1419 } 1419 }
1420 1420
@@ -1607,7 +1607,7 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr
1607 goto done; 1607 goto done;
1608 } 1608 }
1609 1609
1610 default: 1610 default:
1611 sk->sk_state = BT_DISCONN; 1611 sk->sk_state = BT_DISCONN;
1612 sk->sk_err = ECONNRESET; 1612 sk->sk_err = ECONNRESET;
1613 l2cap_sock_set_timer(sk, HZ * 5); 1613 l2cap_sock_set_timer(sk, HZ * 5);