sco.c (97a4649d6ffce4a5d7f5ce018d87a6cefcb4ad03) sco.c (b24b8a247ff65c01b252025926fe564209fae4fc)
1/*
2 BlueZ - Bluetooth protocol stack for Linux
3 Copyright (C) 2000-2001 Qualcomm Incorporated
4
5 Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 2 as

--- 83 unchanged lines hidden (view full) ---

92}
93
94static void sco_sock_clear_timer(struct sock *sk)
95{
96 BT_DBG("sock %p state %d", sk, sk->sk_state);
97 sk_stop_timer(sk, &sk->sk_timer);
98}
99
1/*
2 BlueZ - Bluetooth protocol stack for Linux
3 Copyright (C) 2000-2001 Qualcomm Incorporated
4
5 Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 2 as

--- 83 unchanged lines hidden (view full) ---

92}
93
94static void sco_sock_clear_timer(struct sock *sk)
95{
96 BT_DBG("sock %p state %d", sk, sk->sk_state);
97 sk_stop_timer(sk, &sk->sk_timer);
98}
99
100static void sco_sock_init_timer(struct sock *sk)
101{
102 init_timer(&sk->sk_timer);
103 sk->sk_timer.function = sco_sock_timeout;
104 sk->sk_timer.data = (unsigned long)sk;
105}
106
107/* ---- SCO connections ---- */
108static struct sco_conn *sco_conn_add(struct hci_conn *hcon, __u8 status)
109{
110 struct hci_dev *hdev = hcon->hdev;
111 struct sco_conn *conn = hcon->sco_data;
112
113 if (conn || status)
114 return conn;

--- 316 unchanged lines hidden (view full) ---

431 sk->sk_destruct = sco_sock_destruct;
432 sk->sk_sndtimeo = SCO_CONN_TIMEOUT;
433
434 sock_reset_flag(sk, SOCK_ZAPPED);
435
436 sk->sk_protocol = proto;
437 sk->sk_state = BT_OPEN;
438
100/* ---- SCO connections ---- */
101static struct sco_conn *sco_conn_add(struct hci_conn *hcon, __u8 status)
102{
103 struct hci_dev *hdev = hcon->hdev;
104 struct sco_conn *conn = hcon->sco_data;
105
106 if (conn || status)
107 return conn;

--- 316 unchanged lines hidden (view full) ---

424 sk->sk_destruct = sco_sock_destruct;
425 sk->sk_sndtimeo = SCO_CONN_TIMEOUT;
426
427 sock_reset_flag(sk, SOCK_ZAPPED);
428
429 sk->sk_protocol = proto;
430 sk->sk_state = BT_OPEN;
431
439 sco_sock_init_timer(sk);
432 setup_timer(&sk->sk_timer, sco_sock_timeout, (unsigned long)sk);
440
441 bt_sock_link(&sco_sk_list, sk);
442 return sk;
443}
444
445static int sco_sock_create(struct net *net, struct socket *sock, int protocol)
446{
447 struct sock *sk;

--- 561 unchanged lines hidden ---
433
434 bt_sock_link(&sco_sk_list, sk);
435 return sk;
436}
437
438static int sco_sock_create(struct net *net, struct socket *sock, int protocol)
439{
440 struct sock *sk;

--- 561 unchanged lines hidden ---