aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bluetooth/l2cap_core.c13
-rw-r--r--net/bluetooth/l2cap_sock.c13
2 files changed, 13 insertions, 13 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index da9b3a44b0f0..12abd7ca2825 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -77,19 +77,6 @@ static struct sk_buff *l2cap_build_cmd(struct l2cap_conn *conn,
77 77
78static int l2cap_ertm_data_rcv(struct sock *sk, struct sk_buff *skb); 78static int l2cap_ertm_data_rcv(struct sock *sk, struct sk_buff *skb);
79 79
80/* ---- L2CAP timers ---- */
81void l2cap_sock_set_timer(struct sock *sk, long timeout)
82{
83 BT_DBG("sk %p state %d timeout %ld", sk, sk->sk_state, timeout);
84 sk_reset_timer(sk, &sk->sk_timer, jiffies + timeout);
85}
86
87void l2cap_sock_clear_timer(struct sock *sk)
88{
89 BT_DBG("sock %p state %d", sk, sk->sk_state);
90 sk_stop_timer(sk, &sk->sk_timer);
91}
92
93/* ---- L2CAP channels ---- */ 80/* ---- L2CAP channels ---- */
94static struct sock *__l2cap_get_chan_by_dcid(struct l2cap_chan_list *l, u16 cid) 81static struct sock *__l2cap_get_chan_by_dcid(struct l2cap_chan_list *l, u16 cid)
95{ 82{
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index fe4f834f03dd..23bb968b314a 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -30,6 +30,7 @@
30#include <net/bluetooth/hci_core.h> 30#include <net/bluetooth/hci_core.h>
31#include <net/bluetooth/l2cap.h> 31#include <net/bluetooth/l2cap.h>
32 32
33/* ---- L2CAP timers ---- */
33static void l2cap_sock_timeout(unsigned long arg) 34static void l2cap_sock_timeout(unsigned long arg)
34{ 35{
35 struct sock *sk = (struct sock *) arg; 36 struct sock *sk = (struct sock *) arg;
@@ -63,6 +64,18 @@ static void l2cap_sock_timeout(unsigned long arg)
63 sock_put(sk); 64 sock_put(sk);
64} 65}
65 66
67void l2cap_sock_set_timer(struct sock *sk, long timeout)
68{
69 BT_DBG("sk %p state %d timeout %ld", sk, sk->sk_state, timeout);
70 sk_reset_timer(sk, &sk->sk_timer, jiffies + timeout);
71}
72
73void l2cap_sock_clear_timer(struct sock *sk)
74{
75 BT_DBG("sock %p state %d", sk, sk->sk_state);
76 sk_stop_timer(sk, &sk->sk_timer);
77}
78
66static struct sock *__l2cap_get_sock_by_addr(__le16 psm, bdaddr_t *src) 79static struct sock *__l2cap_get_sock_by_addr(__le16 psm, bdaddr_t *src)
67{ 80{
68 struct sock *sk; 81 struct sock *sk;