diff options
-rw-r--r-- | src/adapter.c | 2 | ||||
-rw-r--r-- | src/device.c | 8 | ||||
-rw-r--r-- | src/device.h | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/adapter.c b/src/adapter.c index f5abfe362..b29ee4094 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -4353,7 +4353,7 @@ static void update_found_devices(struct btd_adapter *adapter, */ if (bdaddr_type != BDADDR_BREDR && eir_data.flags && !(eir_data.flags & EIR_BREDR_UNSUP)) - device_set_bredr_support(dev, true); + device_set_bredr_support(dev); if (eir_data.name != NULL && eir_data.name_complete) device_store_cached_name(dev, eir_data.name); diff --git a/src/device.c b/src/device.c index 41637b3aa..a5fcad70c 100644 --- a/src/device.c +++ b/src/device.c @@ -2467,9 +2467,13 @@ void device_update_addr(struct btd_device *device, const bdaddr_t *bdaddr, DEVICE_INTERFACE, "Address"); } -void device_set_bredr_support(struct btd_device *device, bool bredr) +void device_set_bredr_support(struct btd_device *device) { - device->bredr = bredr; + if (device->bredr) + return; + + device->bredr = true; + store_device_info(device); } void device_update_last_seen(struct btd_device *device, uint8_t bdaddr_type) diff --git a/src/device.h b/src/device.h index 8cb69803d..9c5e4fd51 100644 --- a/src/device.h +++ b/src/device.h @@ -40,7 +40,7 @@ bool device_name_known(struct btd_device *device); void device_set_class(struct btd_device *device, uint32_t class); void device_update_addr(struct btd_device *device, const bdaddr_t *bdaddr, uint8_t bdaddr_type); -void device_set_bredr_support(struct btd_device *device, bool bredr); +void device_set_bredr_support(struct btd_device *device); void device_update_last_seen(struct btd_device *device, uint8_t bdaddr_type); void device_merge_duplicate(struct btd_device *dev, struct btd_device *dup); uint32_t btd_device_get_class(struct btd_device *device); |