Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352260
b: refs/heads/master
c: cf1d081
h: refs/heads/master
v: v3
  • Loading branch information
Johan Hedberg authored and Gustavo Padovan committed Jan 23, 2013
1 parent 9e6b259 commit be28c3e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 60e77321985ab599fac010afdc465c3e30281a06
refs/heads/master: cf1d081f6597a45e5ff63f55c893494a8ae1cdaf
6 changes: 6 additions & 0 deletions trunk/include/net/bluetooth/hci.h
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,12 @@ struct hci_cp_le_create_conn {

#define HCI_OP_LE_CREATE_CONN_CANCEL 0x200e

#define HCI_OP_LE_READ_WHITE_LIST_SIZE 0x200f
struct hci_rp_le_read_white_list_size {
__u8 status;
__u8 size;
} __packed;

#define HCI_OP_LE_CONN_UPDATE 0x2013
struct hci_cp_le_conn_update {
__le16 handle;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/net/bluetooth/hci_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ struct hci_dev {
__u8 features[8];
__u8 host_features[8];
__u8 le_features[8];
__u8 le_white_list_size;
__u8 commands[64];
__u8 hci_ver;
__u16 hci_rev;
Expand Down
20 changes: 20 additions & 0 deletions trunk/net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,9 @@ static void le_setup(struct hci_dev *hdev)

/* Read LE Advertising Channel TX Power */
hci_send_cmd(hdev, HCI_OP_LE_READ_ADV_TX_POWER, 0, NULL);

/* Read LE White List Size */
hci_send_cmd(hdev, HCI_OP_LE_READ_WHITE_LIST_SIZE, 0, NULL);
}

static void hci_setup(struct hci_dev *hdev)
Expand Down Expand Up @@ -1306,6 +1309,19 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,
}
}

static void hci_cc_le_read_white_list_size(struct hci_dev *hdev,
struct sk_buff *skb)
{
struct hci_rp_le_read_white_list_size *rp = (void *) skb->data;

BT_DBG("%s status 0x%2.2x size %u", hdev->name, rp->status, rp->size);

if (!rp->status)
hdev->le_white_list_size = rp->size;

hci_req_complete(hdev, HCI_OP_LE_READ_WHITE_LIST_SIZE, rp->status);
}

static void hci_cc_le_ltk_reply(struct hci_dev *hdev, struct sk_buff *skb)
{
struct hci_rp_le_ltk_reply *rp = (void *) skb->data;
Expand Down Expand Up @@ -2684,6 +2700,10 @@ static void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
hci_cc_le_set_scan_enable(hdev, skb);
break;

case HCI_OP_LE_READ_WHITE_LIST_SIZE:
hci_cc_le_read_white_list_size(hdev, skb);
break;

case HCI_OP_LE_LTK_REPLY:
hci_cc_le_ltk_reply(hdev, skb);
break;
Expand Down

0 comments on commit be28c3e

Please sign in to comment.