summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.ninka.net>2004-01-13 21:01:58 -0800
committerDavid S. Miller <davem@nuts.ninka.net>2004-01-13 21:01:58 -0800
commit46fc74070ebdee51527a2ca20a1e3a1bf4a6bb5b (patch)
tree548331e3bc2919989f8fe443467843fba9b1b7ad /include
parent4547e81c1f3e35dc47c4bfbfd3444cb0401c2b0b (diff)
parentb9ec4b7d0c3d4aaba0e94140f86768cc695c05dc (diff)
Merge
Diffstat (limited to 'include')
-rw-r--r--include/net/bluetooth/bluetooth.h3
-rw-r--r--include/net/bluetooth/hci.h10
-rw-r--r--include/net/bluetooth/hci_core.h14
-rw-r--r--include/net/bluetooth/rfcomm.h9
4 files changed, 30 insertions, 6 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 429847a82f5f..99301bd8096a 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -47,7 +47,8 @@
#define BTPROTO_HCI 1
#define BTPROTO_SCO 2
#define BTPROTO_RFCOMM 3
-#define BTPROTO_BNEP 4
+#define BTPROTO_BNEP 4
+#define BTPROTO_CMTP 5
#define SOL_HCI 0
#define SOL_L2CAP 6
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 228a44322ee0..59523c39d6fb 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -408,6 +408,16 @@ struct inquiry_info {
__u16 clock_offset;
} __attribute__ ((packed));
+#define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22
+struct inquiry_info_with_rssi {
+ bdaddr_t bdaddr;
+ __u8 pscan_rep_mode;
+ __u8 pscan_period_mode;
+ __u8 dev_class[3];
+ __u16 clock_offset;
+ __u8 rssi;
+} __attribute__ ((packed));
+
#define HCI_EV_CONN_COMPLETE 0x03
struct hci_ev_conn_complete {
__u8 status;
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index fd010a9dc75e..6a429873df9c 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -176,6 +176,12 @@ static inline void inquiry_cache_init(struct hci_dev *hdev)
c->list = NULL;
}
+static inline int inquiry_cache_empty(struct hci_dev *hdev)
+{
+ struct inquiry_cache *c = &hdev->inq_cache;
+ return (c->list == NULL);
+}
+
static inline long inquiry_cache_age(struct hci_dev *hdev)
{
struct inquiry_cache *c = &hdev->inq_cache;
@@ -281,10 +287,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)) {
- if (conn->type == SCO_LINK)
+ if (conn->type == ACL_LINK) {
+ unsigned long timeo = (conn->out) ?
+ HCI_DISCONN_TIMEOUT : HCI_DISCONN_TIMEOUT * 2;
+ hci_conn_set_timer(conn, timeo);
+ } else
hci_conn_set_timer(conn, HZ / 100);
- else if (conn->out)
- hci_conn_set_timer(conn, HCI_DISCONN_TIMEOUT);
}
}
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h
index 7d410fed2520..e022bfbb5166 100644
--- a/include/net/bluetooth/rfcomm.h
+++ b/include/net/bluetooth/rfcomm.h
@@ -167,8 +167,8 @@ struct rfcomm_session {
int initiator;
/* Default DLC parameters */
+ int cfc;
uint mtu;
- uint credits;
struct list_head dlcs;
};
@@ -190,7 +190,7 @@ struct rfcomm_dlc {
u8 mscex;
uint mtu;
- uint credits;
+ uint cfc;
uint rx_credits;
uint tx_credits;
@@ -219,6 +219,11 @@ struct rfcomm_dlc {
#define RFCOMM_MSCEX_RX 2
#define RFCOMM_MSCEX_OK (RFCOMM_MSCEX_TX + RFCOMM_MSCEX_RX)
+/* CFC states */
+#define RFCOMM_CFC_UNKNOWN -1
+#define RFCOMM_CFC_DISABLED 0
+#define RFCOMM_CFC_ENABLED RFCOMM_MAX_CREDITS
+
extern struct task_struct *rfcomm_thread;
extern unsigned long rfcomm_event;