[PATCH BlueZ 1/3] core: device: Fix connect bearer selection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux