summaryrefslogtreecommitdiffstats
path: root/src/userial_vendor.c
diff options
context:
space:
mode:
authorDaniel Nygren <daniel.nygren2@sonymobile.com>2014-03-05 15:21:34 +0100
committerSean Wan <swan@google.com>2014-06-11 09:26:18 -0700
commitb01dbb348576f8c06559f18152b98d9a4f83fee1 (patch)
treeb57d26ab9dfbdd0f892426a2f2d1a120ae29127f /src/userial_vendor.c
parent853d93ac84affbe9903b64688bc436c47fa9b606 (diff)
downloadandroid_hardware_broadcom_libbt-b01dbb348576f8c06559f18152b98d9a4f83fee1.tar.gz
android_hardware_broadcom_libbt-b01dbb348576f8c06559f18152b98d9a4f83fee1.tar.bz2
android_hardware_broadcom_libbt-b01dbb348576f8c06559f18152b98d9a4f83fee1.zip
Fix for bt low power mode issue
Brought in from broadcom libbt branch. Change-Id: I4ec3f28029f5ed7c54d3aae78680591f41e84b7b
Diffstat (limited to 'src/userial_vendor.c')
-rwxr-xr-xsrc/userial_vendor.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/userial_vendor.c b/src/userial_vendor.c
index 1a745b5..b9c5f69 100755
--- a/src/userial_vendor.c
+++ b/src/userial_vendor.c
@@ -137,6 +137,19 @@ void userial_ioctl_init_bt_wake(int fd)
{
uint32_t bt_wake_state;
+#if (BT_WAKE_USERIAL_LDISC==TRUE)
+ int ldisc = N_BRCM_HCI; /* brcm sleep mode support line discipline */
+
+ /* attempt to load enable discipline driver */
+ if (ioctl(vnd_userial.fd, TIOCSETD, &ldisc) < 0)
+ {
+ VNDUSERIALDBG("USERIAL_Open():fd %d, TIOCSETD failed: error %d for ldisc: %d",
+ fd, errno, ldisc);
+ }
+#endif
+
+
+
/* assert BT_WAKE through ioctl */
ioctl(fd, USERIAL_IOCTL_BT_WAKE_ASSERT, NULL);
ioctl(fd, USERIAL_IOCTL_BT_WAKE_GET_ST, &bt_wake_state);