Skip to content

Commit

Permalink
[bluetooth] Revert commit that breaks BlueZ SCO handling.
Browse files Browse the repository at this point in the history
Revert "Bluetooth: Block SCO disconnect operation on BT_CLOSED state."

This reverts commit c5a53b5.

Signed-off-by: Hannu Mallat <hannu.mallat@jollamobile.com>
  • Loading branch information
Hannu Mallat authored and RealJohnGalt committed Apr 27, 2016
1 parent 2f66ef3 commit 0b3ae7f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion include/net/bluetooth/sco.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#define SCO_DEFAULT_FLUSH_TO 0xFFFF

#define SCO_CONN_TIMEOUT (HZ * 40)
#define SCO_DISCONN_TIMEOUT (HZ * 20)
#define SCO_DISCONN_TIMEOUT (HZ * 2)
#define SCO_CONN_IDLE_TIMEOUT (HZ * 60)

/* SCO socket address */
Expand Down
8 changes: 0 additions & 8 deletions net/bluetooth/sco.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,9 +814,6 @@ static int sco_sock_shutdown(struct socket *sock, int how)
if (sock_flag(sk, SOCK_LINGER) && sk->sk_lingertime)
err = bt_sock_wait_state(sk, BT_CLOSED,
sk->sk_lingertime);
else
err = bt_sock_wait_state(sk, BT_CLOSED,
SCO_DISCONN_TIMEOUT);
}
release_sock(sk);
return err;
Expand All @@ -838,11 +835,6 @@ static int sco_sock_release(struct socket *sock)
lock_sock(sk);
err = bt_sock_wait_state(sk, BT_CLOSED, sk->sk_lingertime);
release_sock(sk);
} else {
lock_sock(sk);
err = bt_sock_wait_state(sk, BT_CLOSED,
SCO_DISCONN_TIMEOUT);
release_sock(sk);
}

sock_orphan(sk);
Expand Down

0 comments on commit 0b3ae7f

Please sign in to comment.