summaryrefslogtreecommitdiffstats
path: root/binding-bluetooth/bluetooth-manager.h
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-07-25 22:42:42 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2017-07-27 10:39:36 -0700
commitd704861baac62d4a387731b7ea88bfad695b0a60 (patch)
tree35edb06be2a9d87c518cace7fd042af4f8923587 /binding-bluetooth/bluetooth-manager.h
parent66f8a3960ee117e36138e5857269fe2528406cdf (diff)
binding: bluetooth: listen for rfkill bluetooth events
On certain platforms like RPI3 and Porter there is a possible race condition to systemd-rfkill service if using a USB BT device, and this patchset listens for rfkill events, unblocks and brings up hci interface. Bug-AGL: SPEC-569 Change-Id: Id16f26953d17cbe2068807b538c52759016d3e50 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding-bluetooth/bluetooth-manager.h')
-rw-r--r--binding-bluetooth/bluetooth-manager.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/binding-bluetooth/bluetooth-manager.h b/binding-bluetooth/bluetooth-manager.h
index b11b11d..ed02b28 100644
--- a/binding-bluetooth/bluetooth-manager.h
+++ b/binding-bluetooth/bluetooth-manager.h
@@ -20,6 +20,7 @@
#include <glib.h>
#include <gio/gio.h>
#include <glib-object.h>
+#include <sys/ioctl.h>
/* Debug Trace Level */
#define DT_LEVEL_ERROR (1 << 1)
@@ -119,6 +120,12 @@
#define ERROR_BLUEZ_REJECT "org.bluez.Error.Rejected"
#define ERROR_BLUEZ_CANCELED "org.bluez.Error.Canceled"
+
+#define HCIDEVUP _IOW('H', 201, int)
+
+#define AF_BLUETOOTH 31
+#define BTPROTO_HCI 1
+
#if 0
void DebugTraceSendMsg(int level, gchar* message);
#else
@@ -153,6 +160,7 @@ struct btd_device {
typedef struct {
gboolean inited;
GMutex m;
+ gint watch;
GSList * device;
} stBluetoothManage;