linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] android/hidhost: Fix connecting HOGP over BREDR
@ 2015-05-19  8:25 Mariusz Skamra
  2015-05-19  8:56 ` [PATCHv2] " Mariusz Skamra
  0 siblings, 1 reply; 7+ messages in thread
From: Mariusz Skamra @ 2015-05-19  8:25 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Mariusz Skamra

This patch fixes issue related to HID connection over BREDR.
To avoid HOG connection with dual mode device connected over
BREDR, bdaddr_type is checked, so that 'if' condition tests
connection type, not the features of remote device.
---
 android/hidhost.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/android/hidhost.c b/android/hidhost.c
index 729b884..100432f 100644
--- a/android/hidhost.c
+++ b/android/hidhost.c
@@ -874,6 +874,7 @@ static void bt_hid_connect(const void *buf, uint16_t len)
 	bdaddr_t dst;
 	GSList *l;
 	uuid_t uuid;
+	uint8_t bdaddr_type;
 
 	DBG("");
 
@@ -891,7 +892,9 @@ static void bt_hid_connect(const void *buf, uint16_t len)
 	ba2str(&dev->dst, addr);
 	DBG("connecting to %s", addr);
 
-	if (bt_is_device_le(&dst)) {
+	bt_get_id_addr(&dst, &bdaddr_type);
+
+	if (bdaddr_type != BDADDR_BREDR) {
 		if (!hog_connect(dev)) {
 			status = HAL_STATUS_FAILED;
 			hid_device_remove(dev);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-05-22 13:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-19  8:25 [PATCH] android/hidhost: Fix connecting HOGP over BREDR Mariusz Skamra
2015-05-19  8:56 ` [PATCHv2] " Mariusz Skamra
2015-05-19 14:09   ` Szymon Janc
2015-05-20  9:55     ` [PATCHv2] android/pts: Update SM test results Mariusz Skamra
2015-05-22 13:13       ` Szymon Janc
2015-05-20  9:56     ` [PATCHv3] android/hidhost: Fix connecting HOGP over BREDR Mariusz Skamra
2015-05-22 13:17       ` Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).