diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2011-12-02 07:13:31 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-12-02 07:19:31 -0500 |
commit | 07f7fa5db1e65a27066c8ebf9fc676a4168e07f4 (patch) | |
tree | a9a57514cf4c815ecb158ad3f5b5f87145dcf1b6 | |
parent | d23264a896a931c4b355c102d8e9d46649195ba4 (diff) |
Bluetooth: LE Set Scan Parameter Command
This patch adds the parameter struct and the command complete event
handler to the LE Set Scan Parameter HCI command.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
-rw-r--r-- | include/net/bluetooth/hci.h | 9 | ||||
-rw-r--r-- | net/bluetooth/hci_event.c | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index e2ed3683f1c..67ad9843034 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -782,6 +782,15 @@ struct hci_rp_le_read_buffer_size { | |||
782 | __u8 le_max_pkt; | 782 | __u8 le_max_pkt; |
783 | } __packed; | 783 | } __packed; |
784 | 784 | ||
785 | #define HCI_OP_LE_SET_SCAN_PARAM 0x200b | ||
786 | struct hci_cp_le_set_scan_param { | ||
787 | __u8 type; | ||
788 | __le16 interval; | ||
789 | __le16 window; | ||
790 | __u8 own_address_type; | ||
791 | __u8 filter_policy; | ||
792 | } __packed; | ||
793 | |||
785 | #define HCI_OP_LE_SET_SCAN_ENABLE 0x200c | 794 | #define HCI_OP_LE_SET_SCAN_ENABLE 0x200c |
786 | struct hci_cp_le_set_scan_enable { | 795 | struct hci_cp_le_set_scan_enable { |
787 | __u8 enable; | 796 | __u8 enable; |
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index acbdfbeeb92..4f35ecdc6c6 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -992,6 +992,13 @@ static void hci_cc_read_local_oob_data_reply(struct hci_dev *hdev, | |||
992 | hci_dev_unlock(hdev); | 992 | hci_dev_unlock(hdev); |
993 | } | 993 | } |
994 | 994 | ||
995 | static void hci_cc_le_set_scan_param(struct hci_dev *hdev, struct sk_buff *skb) | ||
996 | { | ||
997 | __u8 status = *((__u8 *) skb->data); | ||
998 | |||
999 | BT_DBG("%s status 0x%x", hdev->name, status); | ||
1000 | } | ||
1001 | |||
995 | static void hci_cc_le_set_scan_enable(struct hci_dev *hdev, | 1002 | static void hci_cc_le_set_scan_enable(struct hci_dev *hdev, |
996 | struct sk_buff *skb) | 1003 | struct sk_buff *skb) |
997 | { | 1004 | { |
@@ -2077,6 +2084,9 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *sk | |||
2077 | 2084 | ||
2078 | case HCI_OP_USER_PASSKEY_NEG_REPLY: | 2085 | case HCI_OP_USER_PASSKEY_NEG_REPLY: |
2079 | hci_cc_user_passkey_neg_reply(hdev, skb); | 2086 | hci_cc_user_passkey_neg_reply(hdev, skb); |
2087 | |||
2088 | case HCI_OP_LE_SET_SCAN_PARAM: | ||
2089 | hci_cc_le_set_scan_param(hdev, skb); | ||
2080 | break; | 2090 | break; |
2081 | 2091 | ||
2082 | case HCI_OP_LE_SET_SCAN_ENABLE: | 2092 | case HCI_OP_LE_SET_SCAN_ENABLE: |