diff options
author | Ville Tervo <ville.tervo@nokia.com> | 2011-02-10 20:38:46 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-02-16 14:32:15 -0500 |
commit | 63185f64ef06464706b32c9a301f71f68cd93e52 (patch) | |
tree | 2536470da088437e7a8e4a91a222dc6bfe376211 /include | |
parent | 903d343e202e51059e7d20524010ef54a6087aed (diff) |
Bluetooth: Add low energy commands and events
Add needed HCI command and event structs to
create LE connections.
Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/bluetooth/hci.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 4bee030e4b52..802d2505f138 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -642,6 +642,36 @@ struct hci_rp_read_bd_addr { | |||
642 | bdaddr_t bdaddr; | 642 | bdaddr_t bdaddr; |
643 | } __packed; | 643 | } __packed; |
644 | 644 | ||
645 | #define HCI_OP_LE_SET_EVENT_MASK 0x2001 | ||
646 | struct hci_cp_le_set_event_mask { | ||
647 | __u8 mask[8]; | ||
648 | } __packed; | ||
649 | |||
650 | #define HCI_OP_LE_READ_BUFFER_SIZE 0x2002 | ||
651 | struct hci_rp_le_read_buffer_size { | ||
652 | __u8 status; | ||
653 | __le16 le_mtu; | ||
654 | __u8 le_max_pkt; | ||
655 | } __packed; | ||
656 | |||
657 | #define HCI_OP_LE_CREATE_CONN 0x200d | ||
658 | struct hci_cp_le_create_conn { | ||
659 | __le16 scan_interval; | ||
660 | __le16 scan_window; | ||
661 | __u8 filter_policy; | ||
662 | __u8 peer_addr_type; | ||
663 | bdaddr_t peer_addr; | ||
664 | __u8 own_address_type; | ||
665 | __le16 conn_interval_min; | ||
666 | __le16 conn_interval_max; | ||
667 | __le16 conn_latency; | ||
668 | __le16 supervision_timeout; | ||
669 | __le16 min_ce_len; | ||
670 | __le16 max_ce_len; | ||
671 | } __packed; | ||
672 | |||
673 | #define HCI_OP_LE_CREATE_CONN_CANCEL 0x200e | ||
674 | |||
645 | /* ---- HCI Events ---- */ | 675 | /* ---- HCI Events ---- */ |
646 | #define HCI_EV_INQUIRY_COMPLETE 0x01 | 676 | #define HCI_EV_INQUIRY_COMPLETE 0x01 |
647 | 677 | ||
@@ -902,6 +932,25 @@ struct hci_ev_remote_host_features { | |||
902 | __u8 features[8]; | 932 | __u8 features[8]; |
903 | } __packed; | 933 | } __packed; |
904 | 934 | ||
935 | #define HCI_EV_LE_META 0x3e | ||
936 | struct hci_ev_le_meta { | ||
937 | __u8 subevent; | ||
938 | } __packed; | ||
939 | |||
940 | /* Low energy meta events */ | ||
941 | #define HCI_EV_LE_CONN_COMPLETE 0x01 | ||
942 | struct hci_ev_le_conn_complete { | ||
943 | __u8 status; | ||
944 | __le16 handle; | ||
945 | __u8 role; | ||
946 | __u8 bdaddr_type; | ||
947 | bdaddr_t bdaddr; | ||
948 | __le16 interval; | ||
949 | __le16 latency; | ||
950 | __le16 supervision_timeout; | ||
951 | __u8 clk_accurancy; | ||
952 | } __packed; | ||
953 | |||
905 | /* Internal events generated by Bluetooth stack */ | 954 | /* Internal events generated by Bluetooth stack */ |
906 | #define HCI_EV_STACK_INTERNAL 0xfd | 955 | #define HCI_EV_STACK_INTERNAL 0xfd |
907 | struct hci_ev_stack_internal { | 956 | struct hci_ev_stack_internal { |