Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290884
b: refs/heads/master
c: 4ddb193
h: refs/heads/master
v: v3
  • Loading branch information
Johan Hedberg committed Feb 13, 2012
1 parent 2270eb3 commit e9f17c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e319d2e74378660c5e09a1b8703663ba97f0f62a
refs/heads/master: 4ddb1930f91b7395a760cd4a8cf1b2a87011571c
9 changes: 5 additions & 4 deletions trunk/net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -2842,7 +2842,7 @@ static inline void hci_sniff_subrate_evt(struct hci_dev *hdev, struct sk_buff *s
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;
Expand All @@ -2858,7 +2858,7 @@ static inline bool eir_has_complete_name(u8 *data, size_t data_len)
if (parsed > data_len)
break;

if (data[1] == EIR_NAME_COMPLETE)
if (data[1] == type)
return true;

data += field_len + 1;
Expand Down Expand Up @@ -2893,8 +2893,9 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct
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;

Expand Down

0 comments on commit e9f17c3

Please sign in to comment.