Diff between ef3244424199747e79c5ea9ed5ce2173655966da and dbdb49795bbc09144656fcce11ae7926aefba6da

Changed Files

File Additions Deletions Status
src/device.c +13 -0 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index 2eefc53..c7c5f58 100644
--- a/src/device.c
+++ b/src/device.c
@@ -158,6 +158,8 @@ struct btd_device {
 	bdaddr_t	bdaddr;
 	uint8_t		bdaddr_type;
 	char		*path;
+	bool		bredr;
+	bool		le;
 	bool		pending_paired;		/* "Paired" waiting for SDP */
 	bool		svc_resolved;
 	bool		svc_refreshed;
@@ -2216,6 +2218,12 @@ struct btd_device *device_create(struct btd_adapter *adapter,
 		return NULL;
 
 	device->bdaddr_type = bdaddr_type;
+
+	if (bdaddr_type == BDADDR_BREDR)
+		device->bredr = true;
+	else
+		device->le = true;
+
 	sba = btd_adapter_get_address(adapter);
 	ba2str(sba, src);
 
@@ -2307,6 +2315,11 @@ void device_update_addr(struct btd_device *device, const bdaddr_t *bdaddr,
 					bdaddr_type == device->bdaddr_type)
 		return;
 
+	/* Since this function is only used for LE SMP Identity
+	 * Resolving purposes we can now assume LE is supported.
+	 */
+	device->le = true;
+
 	bacpy(&device->bdaddr, bdaddr);
 	device->bdaddr_type = bdaddr_type;