diff options
| author | Marcel Holtmann <linux-bt.adm@hostme.bitkeeper.com> | 2003-04-10 00:03:50 -0700 |
|---|---|---|
| committer | Marcel Holtmann <linux-bt.adm@hostme.bitkeeper.com> | 2003-04-10 00:03:50 -0700 |
| commit | 6cab1305af4fa39c805a8643df3197cf08b0e2f0 (patch) | |
| tree | d982e58a8ece5aeb3cf2b097552dc5b792f6a6ee /include/net | |
| parent | 064d7c46a94c981cb227db17631d3d19d1ab0ab1 (diff) | |
| parent | 83363e8a79c629d452604ccc33c13b54d12ea570 (diff) | |
Merge bk://linux.bkbits.net/linux-2.5
into hostme.bitkeeper.com:/ua/repos/l/linux-bt/bt-2.5
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/bluetooth/hci_core.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 044df634d3bd..5bf98447775c 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -262,7 +262,7 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *src); int hci_conn_auth(struct hci_conn *conn); int hci_conn_encrypt(struct hci_conn *conn); -static inline void hci_conn_set_timer(struct hci_conn *conn, long timeout) +static inline void hci_conn_set_timer(struct hci_conn *conn, unsigned long timeout) { mod_timer(&conn->timer, jiffies + timeout); } @@ -280,8 +280,12 @@ static inline void hci_conn_hold(struct hci_conn *conn) static inline void hci_conn_put(struct hci_conn *conn) { - if (atomic_dec_and_test(&conn->refcnt) && conn->out) - hci_conn_set_timer(conn, HCI_DISCONN_TIMEOUT); + if (atomic_dec_and_test(&conn->refcnt)) { + if (conn->type == SCO_LINK) + hci_conn_set_timer(conn, HZ / 100); + else if (conn->out) + hci_conn_set_timer(conn, HCI_DISCONN_TIMEOUT); + } } /* ----- HCI tasks ----- */ |
