Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290886
b: refs/heads/master
c: 6759a67
h: refs/heads/master
v: v3
  • Loading branch information
Johan Hedberg committed Feb 13, 2012
1 parent 02e3850 commit ae77e03
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 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: 9ec9fc8a99acc8a521337612b5e49521c49cb4c5
refs/heads/master: 6759a67579a927f2a92f398cf67555e6cc92d0ff
25 changes: 25 additions & 0 deletions trunk/include/net/bluetooth/hci_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,31 @@ static inline void hci_role_switch_cfm(struct hci_conn *conn, __u8 status,
read_unlock(&hci_cb_list_lock);
}

static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type)
{
u8 field_len;
size_t parsed;

for (parsed = 0; parsed < data_len - 1; parsed += field_len) {
field_len = data[0];

if (field_len == 0)
break;

parsed += field_len + 1;

if (parsed > data_len)
break;

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

data += field_len + 1;
}

return false;
}

int hci_register_cb(struct hci_cb *hcb);
int hci_unregister_cb(struct hci_cb *hcb);

Expand Down
25 changes: 0 additions & 25 deletions trunk/net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -2842,31 +2842,6 @@ 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_data_type(u8 *data, size_t data_len, u8 type)
{
u8 field_len;
size_t parsed;

for (parsed = 0; parsed < data_len - 1; parsed += field_len) {
field_len = data[0];

if (field_len == 0)
break;

parsed += field_len + 1;

if (parsed > data_len)
break;

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

data += field_len + 1;
}

return false;
}

static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct sk_buff *skb)
{
struct inquiry_data data;
Expand Down

0 comments on commit ae77e03

Please sign in to comment.