linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/3] core: device: Fix connect bearer selection
@ 2015-01-15  3:52 Arman Uguray
  2015-01-15  3:52 ` [PATCH BlueZ 2/3] core: device: Fix device_browse_gatt Arman Uguray
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arman Uguray @ 2015-01-15  3:52 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Arman Uguray

For dual-mode devices created from storage, trying to connect without
a scan sometimes causes the incorrect bearer to be connected. This
patch modifies device.c:select_conn_bearer so that it simply returns the
stored bdaddr_type of a device if neither bredr nor le have been seen
in a while.
---
 src/device.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/device.c b/src/device.c
index 1e13565..b5c19dd 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1537,6 +1537,9 @@ static uint8_t select_conn_bearer(struct btd_device *dev)
 			le_last = NVAL_TIME;
 	}
 
+	if (le_last == NVAL_TIME && bredr_last == NVAL_TIME)
+		return dev->bdaddr_type;
+
 	if (dev->bredr && (!dev->le || le_last == NVAL_TIME))
 		return BDADDR_BREDR;
 
-- 
2.2.0.rc0.207.ga3a616c


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

end of thread, other threads:[~2015-01-15 20:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-15  3:52 [PATCH BlueZ 1/3] core: device: Fix connect bearer selection Arman Uguray
2015-01-15  3:52 ` [PATCH BlueZ 2/3] core: device: Fix device_browse_gatt Arman Uguray
2015-01-15  3:52 ` [PATCH BlueZ 3/3] core: adapter: Fix device name setting Arman Uguray
2015-01-15 20:11 ` [PATCH BlueZ 1/3] core: device: Fix connect bearer selection Johan Hedberg

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).