summaryrefslogtreecommitdiff
path: root/sys/dev/bluetooth/btdev.h
diff options
context:
space:
mode:
authorUwe Stuehler <uwe@cvs.openbsd.org>2008-02-24 21:46:20 +0000
committerUwe Stuehler <uwe@cvs.openbsd.org>2008-02-24 21:46:20 +0000
commit8b56fd8028eb15e94de291467a4bf213a13f0b3a (patch)
treebd3d86efff3a7f1f48de401e03ed235036f1afd6 /sys/dev/bluetooth/btdev.h
parente1b76e90d81c71953efdcba2e828cdeae87cd7a9 (diff)
Sync Bluetooth HID drivers with NetBSD and adopt to our needs, as we
don't have problib
Diffstat (limited to 'sys/dev/bluetooth/btdev.h')
-rw-r--r--sys/dev/bluetooth/btdev.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/sys/dev/bluetooth/btdev.h b/sys/dev/bluetooth/btdev.h
index e158b9598e6..d08ed593280 100644
--- a/sys/dev/bluetooth/btdev.h
+++ b/sys/dev/bluetooth/btdev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: btdev.h,v 1.3 2007/09/01 17:06:26 xsa Exp $ */
+/* $OpenBSD: btdev.h,v 1.4 2008/02/24 21:46:19 uwe Exp $ */
/* $NetBSD: btdev.h,v 1.1 2006/06/19 15:44:45 gdamore Exp $ */
/*-
@@ -35,6 +35,8 @@
#ifndef _DEV_BLUETOOTH_BTDEV_H_
#define _DEV_BLUETOOTH_BTDEV_H_
+#include <netbt/bluetooth.h>
+
/*
* Bluetooth Device attach arguments (from userland)
*/
@@ -42,6 +44,7 @@ struct btdev_attach_args {
bdaddr_t bd_laddr; /* local address */
bdaddr_t bd_raddr; /* remote address */
uint16_t bd_type; /* device type */
+ int bd_mode; /* link mode */
union {
struct { /* HID arguments */
@@ -55,28 +58,38 @@ struct btdev_attach_args {
struct { /* HSET arguments */
uint8_t hset_channel; /* RFCOMM channel */
uint8_t hset_mtu; /* SCO mtu */
+ int hset_listen; /* connect or listen */
} bdd_hset;
- struct { /* Advance Audio arguments */
- } bdd_a2dp;
+ struct { /* HF arguments */
+ uint8_t hf_channel; /* RFCOMM channel */
+ uint8_t hf_mtu; /* SCO mtu */
+ int hf_listen; /* connect or listen */
+ } bdd_hf;
} bdd;
};
#define bd_hid bdd.bdd_hid
#define bd_hset bdd.bdd_hset
-#define bd_a2dp bdd.bdd_a2dp
+#define bd_hf bdd.bdd_hf
/* btdev type */
#define BTDEV_HID 0x0001
#define BTDEV_HSET 0x0002
+#define BTDEV_HF 0x0003
+
+/* btdev link mode */
+#define BTDEV_MODE_NONE 0
+#define BTDEV_MODE_AUTH 1
+#define BTDEV_MODE_ENCRYPT 2
+#define BTDEV_MODE_SECURE 3
/* bthid flags */
#define BTHID_INITIATE (1 << 0) /* normally initiate */
-#define BTHID_CONNECT (1 << 1) /* initiate connect */
/* btdev attach/detach ioctl's */
#define BTDEV_ATTACH _IOW('b', 14, struct btdev_attach_args)
-#define BTDEV_DETACH _IOW('b', 15, bdaddr_t)
+#define BTDEV_DETACH _IOW('b', 15, struct btdev_attach_args)
#ifdef _KERNEL
@@ -86,6 +99,7 @@ struct btdev_attach_args {
struct btdev {
struct device sc_dev; /* system device */
bdaddr_t sc_addr; /* device bdaddr */
+ uint16_t sc_type; /* device type */
LIST_ENTRY(btdev) sc_next;
};