This allows for other uses such as checking for an embedded class of
device value in order to decide whether to append the class or not.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
BT_DBG("%s status %d", hdev->name, ev->status);
}
-static inline bool eir_has_complete_name(u8 *data, size_t data_len)
+static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type)
{
u8 field_len;
size_t parsed;
if (parsed > data_len)
break;
- if (data[1] == EIR_NAME_COMPLETE)
+ if (data[1] == type)
return true;
data += field_len + 1;
data.ssp_mode = 0x01;
if (test_bit(HCI_MGMT, &hdev->dev_flags))
- name_known = eir_has_complete_name(info->data,
- sizeof(info->data));
+ name_known = eir_has_data_type(info->data,
+ sizeof(info->data),
+ EIR_NAME_COMPLETE);
else
name_known = true;