summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-07-31 09:56:18 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-07-31 09:56:18 +0000
commit646fda930139720d7d9c45cc085ae4eb7018d8bb (patch)
tree3c8761e4164053e4c3b49c9f007716707123dc97
parent05909adb9c4d36adb8d95c14ab5d4aa6514edbe5 (diff)
Add link supervision timeout change event
-rw-r--r--include/hci.h11
-rw-r--r--src/hci.c6
2 files changed, 12 insertions, 5 deletions
diff --git a/include/hci.h b/include/hci.h
index 65480140..329f2b3a 100644
--- a/include/hci.h
+++ b/include/hci.h
@@ -835,14 +835,14 @@ typedef struct {
typedef struct {
uint8_t status;
uint16_t handle;
- uint16_t link_sup_to;
+ uint16_t timeout;
} __attribute__ ((packed)) read_link_supervision_timeout_rp;
#define READ_LINK_SUPERVISION_TIMEOUT_RP_SIZE 5
#define OCF_WRITE_LINK_SUPERVISION_TIMEOUT 0x0037
typedef struct {
uint16_t handle;
- uint16_t link_sup_to;
+ uint16_t timeout;
} __attribute__ ((packed)) write_link_supervision_timeout_cp;
#define WRITE_LINK_SUPERVISION_TIMEOUT_CP_SIZE 4
typedef struct {
@@ -1401,6 +1401,13 @@ typedef struct {
} __attribute__ ((packed)) extended_inquiry_info;
#define EXTENDED_INQUIRY_INFO_SIZE 254
+#define EVT_LINK_SUPERVISION_TIMEOUT 0x38
+typedef struct {
+ uint16_t handle;
+ uint16_t timeout;
+} __attribute__ ((packed)) evt_link_supervision_timeout;
+#define EVT_LINK_SUPERVISION_TIMEOUT_SIZE 4
+
#define EVT_TESTING 0xFE
#define EVT_VENDOR 0xFF
diff --git a/src/hci.c b/src/hci.c
index 48989aae..7135501b 100644
--- a/src/hci.c
+++ b/src/hci.c
@@ -2058,7 +2058,7 @@ int hci_read_link_supervision_timeout(int dd, uint16_t handle, uint16_t *timeout
return -1;
}
- *timeout = rp.link_sup_to;
+ *timeout = rp.timeout;
return 0;
}
@@ -2069,8 +2069,8 @@ int hci_write_link_supervision_timeout(int dd, uint16_t handle, uint16_t timeout
struct hci_request rq;
memset(&cp, 0, sizeof(cp));
- cp.handle = handle;
- cp.link_sup_to = timeout;
+ cp.handle = handle;
+ cp.timeout = timeout;
memset(&rq, 0, sizeof(rq));
rq.ogf = OGF_HOST_CTL;