The logic for setting the BR/EDR supported flag checked for the
non-presence of the BR/EDR Unsupported flag without checking whether
any flags were present at all.
This meant all LE-only devices that returned Scan Response Data were
being marked as supporting BR/EDR, since the flag was only set in the
initial AD and not the SRD.
device_update_last_seen(dev, bdaddr_type);
- if (bdaddr_type != BDADDR_BREDR && !(eir_data.flags & EIR_BREDR_UNSUP))
+ if (bdaddr_type != BDADDR_BREDR && eir_data.flags &&
+ !(eir_data.flags & EIR_BREDR_UNSUP))
device_set_bredr_support(dev, true);
if (eir_data.name != NULL && eir_data.name_complete)