summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2003-04-28 05:22:30 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-04-28 05:22:30 -0700
commit8feb324fbbec25545324fddbd3aea63f1c5438b9 (patch)
tree792db4a39e9c64c5f19ce34e2dfa7bc40d70d868 /include
parent204048debe9828a2411fdfe21f889516d8099291 (diff)
parent2d6ed7812e266327470f5f4f2d142077b588f15a (diff)
Merge bk://linux-bt.bkbits.net/bt-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
Diffstat (limited to 'include')
-rw-r--r--include/net/bluetooth/hci_core.h10
-rw-r--r--include/net/bluetooth/rfcomm.h10
2 files changed, 14 insertions, 6 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 ----- */
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h
index 73d85aae16f9..2efdc72f4193 100644
--- a/include/net/bluetooth/rfcomm.h
+++ b/include/net/bluetooth/rfcomm.h
@@ -146,6 +146,11 @@ struct rfcomm_rpn {
u16 param_mask;
} __attribute__ ((packed));
+struct rfcomm_rls {
+ u8 dlci;
+ u8 status;
+} __attribute__ ((packed));
+
struct rfcomm_msc {
u8 dlci;
u8 v24_sig;
@@ -215,10 +220,9 @@ static inline void rfcomm_schedule(uint event)
{
if (!rfcomm_thread)
return;
-
//set_bit(event, &rfcomm_event);
- if (!test_and_set_bit(RFCOMM_SCHED_WAKEUP, &rfcomm_event))
- wake_up_process(rfcomm_thread);
+ set_bit(RFCOMM_SCHED_WAKEUP, &rfcomm_event);
+ wake_up_process(rfcomm_thread);
}
extern struct semaphore rfcomm_sem;