From ae84f859b95b5b32524529e2e0a0f8c93a5ad3e0 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Tue, 25 Jul 2017 22:42:42 -0700 Subject: 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. Change-Id: I336e496b589a23767003e186473c4aed49471fba Bug-AGL: SPEC-569 Signed-off-by: Matt Ranostay --- binding-bluetooth/bluetooth-manager.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'binding-bluetooth/bluetooth-manager.h') 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 #include #include +#include /* 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; -- cgit 1.2.3-korg