diff options
author | Nick Pelly <npelly@google.com> | 2010-02-17 20:45:48 -0800 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2010-02-17 20:46:01 -0800 |
commit | ce1c698ea8a242f386d03f236fac1af4f0e83495 (patch) | |
tree | d42bc400e5b7fa2b8fd0afe0e26140d149be6f49 /net | |
parent | aace891ed58b0081b0207debb517567a499b50ed (diff) |
Revert "Bluetooth: Fix rejected connection not disconnecting ACL link"
This reverts commit 9e726b17422bade75fba94e625cd35fd1353e682.
Change-Id: I3bc2e4caa2a0e0c36b9c7de4a09b03276adae4e1
Signed-off-by: Nick Pelly <npelly@google.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/rfcomm/core.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index d101f7b3505e..e105d36f01a7 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c @@ -244,33 +244,6 @@ static inline int rfcomm_check_security(struct rfcomm_dlc *d) auth_type); } -static void rfcomm_session_timeout(unsigned long arg) -{ - struct rfcomm_session *s = (void *) arg; - - BT_DBG("session %p state %ld", s, s->state); - - set_bit(RFCOMM_TIMED_OUT, &s->flags); - rfcomm_session_put(s); - rfcomm_schedule(RFCOMM_SCHED_TIMEO); -} - -static void rfcomm_session_set_timer(struct rfcomm_session *s, long timeout) -{ - BT_DBG("session %p state %ld timeout %ld", s, s->state, timeout); - - if (!mod_timer(&s->timer, jiffies + timeout)) - rfcomm_session_hold(s); -} - -static void rfcomm_session_clear_timer(struct rfcomm_session *s) -{ - BT_DBG("session %p state %ld", s, s->state); - - if (timer_pending(&s->timer) && del_timer(&s->timer)) - rfcomm_session_put(s); -} - /* ---- RFCOMM DLCs ---- */ static void rfcomm_dlc_timeout(unsigned long arg) { @@ -347,7 +320,6 @@ static void rfcomm_dlc_link(struct rfcomm_session *s, struct rfcomm_dlc *d) rfcomm_session_hold(s); - rfcomm_session_clear_timer(s); rfcomm_dlc_hold(d); list_add(&d->list, &s->dlcs); d->session = s; @@ -363,9 +335,6 @@ static void rfcomm_dlc_unlink(struct rfcomm_dlc *d) d->session = NULL; rfcomm_dlc_put(d); - if (list_empty(&s->dlcs)) - rfcomm_session_set_timer(s, RFCOMM_IDLE_TIMEOUT); - rfcomm_session_put(s); } @@ -597,8 +566,6 @@ static struct rfcomm_session *rfcomm_session_add(struct socket *sock, int state) BT_DBG("session %p sock %p", s, sock); - setup_timer(&s->timer, rfcomm_session_timeout, (unsigned long) s); - INIT_LIST_HEAD(&s->dlcs); s->state = state; s->sock = sock; @@ -630,7 +597,6 @@ static void rfcomm_session_del(struct rfcomm_session *s) if (state == BT_CONNECTED) rfcomm_send_disc(s, 0); - rfcomm_session_clear_timer(s); sock_release(s->sock); kfree(s); @@ -672,7 +638,6 @@ static void rfcomm_session_close(struct rfcomm_session *s, int err) __rfcomm_dlc_close(d, err); } - rfcomm_session_clear_timer(s); rfcomm_session_put(s); } @@ -1914,12 +1879,6 @@ static inline void rfcomm_process_sessions(void) struct rfcomm_session *s; s = list_entry(p, struct rfcomm_session, list); - if (test_and_clear_bit(RFCOMM_TIMED_OUT, &s->flags)) { - s->state = BT_DISCONN; - rfcomm_send_disc(s, 0); - continue; - } - if (s->state == BT_LISTEN) { rfcomm_accept_connection(s); continue; |