Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
From 9ea34a45b82771a564ba9549752d152fbd529acf Mon Sep 17 00:00:00 2001
From: Pawit Pornkitprasan <p.pawit@gmail.com>
Date: Tue, 10 Dec 2013 20:09:12 +0700
Subject: [PATCH] libbt: switch to N_BRCM_HCI line disclipline for userial
ioctl
Change-Id: I12c297c6b26fc0cb6f0a36ed8f5d04d4d36a4092
---
src/userial_vendor.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/userial_vendor.c b/src/userial_vendor.c
index 5233d19..86d98e8 100755
--- a/src/userial_vendor.c
+++ b/src/userial_vendor.c
@@ -183,6 +183,10 @@ int userial_vendor_open(tUSERIAL_CFG *p_cfg)
uint16_t parity;
uint8_t stop_bits;
+#if (BT_WAKE_VIA_USERIAL_IOCTL==TRUE)
+ int ldisc;
+#endif
+
vnd_userial.fd = -1;
if (!userial_to_tcio_baud(p_cfg->baud, &baud))
@@ -252,6 +256,13 @@ int userial_vendor_open(tUSERIAL_CFG *p_cfg)
tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios);
#if (BT_WAKE_VIA_USERIAL_IOCTL==TRUE)
+ // TODO: check for breakage on tuna (Galaxy Nexus). It defines this,
+ // but does not contain the kernel code to support it.
+
+ // Switch to N_BRCM_HCI line disclipline for ioctl to work
+ ldisc = 25; // N_BRCM_HCI
+ ioctl(vnd_userial.fd, TIOCSETD, &ldisc);
+
userial_ioctl_init_bt_wake(vnd_userial.fd);
#endif
--
1.8.3.4 (Apple Git-47)
@tabaqui10

This comment has been minimized.

Copy link

tabaqui10 commented Jan 31, 2017

Noob question :
How van we patch ?
Vive me a tutoriel if you can please ;)
Thank you un advance √

@tabaqui10

This comment has been minimized.

Copy link

tabaqui10 commented Jan 31, 2017

Can*...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.