diff options
Diffstat (limited to 'include/net/bluetooth/hci_core.h')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 9fc7728f94e4..20fd57367ddc 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -25,7 +25,6 @@ | |||
25 | #ifndef __HCI_CORE_H | 25 | #ifndef __HCI_CORE_H |
26 | #define __HCI_CORE_H | 26 | #define __HCI_CORE_H |
27 | 27 | ||
28 | #include <linux/interrupt.h> | ||
29 | #include <net/bluetooth/hci.h> | 28 | #include <net/bluetooth/hci.h> |
30 | 29 | ||
31 | /* HCI priority */ | 30 | /* HCI priority */ |
@@ -65,7 +64,7 @@ struct discovery_state { | |||
65 | DISCOVERY_RESOLVING, | 64 | DISCOVERY_RESOLVING, |
66 | DISCOVERY_STOPPING, | 65 | DISCOVERY_STOPPING, |
67 | } state; | 66 | } state; |
68 | struct list_head all; /* All devices found during inquiry */ | 67 | struct list_head all; /* All devices found during inquiry */ |
69 | struct list_head unknown; /* Name state not known */ | 68 | struct list_head unknown; /* Name state not known */ |
70 | struct list_head resolve; /* Name needs to be resolved */ | 69 | struct list_head resolve; /* Name needs to be resolved */ |
71 | __u32 timestamp; | 70 | __u32 timestamp; |
@@ -105,7 +104,7 @@ struct link_key { | |||
105 | struct list_head list; | 104 | struct list_head list; |
106 | bdaddr_t bdaddr; | 105 | bdaddr_t bdaddr; |
107 | u8 type; | 106 | u8 type; |
108 | u8 val[16]; | 107 | u8 val[HCI_LINK_KEY_SIZE]; |
109 | u8 pin_len; | 108 | u8 pin_len; |
110 | }; | 109 | }; |
111 | 110 | ||
@@ -333,6 +332,7 @@ struct hci_conn { | |||
333 | void *l2cap_data; | 332 | void *l2cap_data; |
334 | void *sco_data; | 333 | void *sco_data; |
335 | void *smp_conn; | 334 | void *smp_conn; |
335 | struct amp_mgr *amp_mgr; | ||
336 | 336 | ||
337 | struct hci_conn *link; | 337 | struct hci_conn *link; |
338 | 338 | ||
@@ -360,7 +360,8 @@ extern int l2cap_connect_cfm(struct hci_conn *hcon, u8 status); | |||
360 | extern int l2cap_disconn_ind(struct hci_conn *hcon); | 360 | extern int l2cap_disconn_ind(struct hci_conn *hcon); |
361 | extern int l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason); | 361 | extern int l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason); |
362 | extern int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt); | 362 | extern int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt); |
363 | extern int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags); | 363 | extern int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, |
364 | u16 flags); | ||
364 | 365 | ||
365 | extern int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr); | 366 | extern int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr); |
366 | extern int sco_connect_cfm(struct hci_conn *hcon, __u8 status); | 367 | extern int sco_connect_cfm(struct hci_conn *hcon, __u8 status); |
@@ -429,8 +430,8 @@ enum { | |||
429 | static inline bool hci_conn_ssp_enabled(struct hci_conn *conn) | 430 | static inline bool hci_conn_ssp_enabled(struct hci_conn *conn) |
430 | { | 431 | { |
431 | struct hci_dev *hdev = conn->hdev; | 432 | struct hci_dev *hdev = conn->hdev; |
432 | return (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags) && | 433 | return test_bit(HCI_SSP_ENABLED, &hdev->dev_flags) && |
433 | test_bit(HCI_CONN_SSP_ENABLED, &conn->flags)); | 434 | test_bit(HCI_CONN_SSP_ENABLED, &conn->flags); |
434 | } | 435 | } |
435 | 436 | ||
436 | static inline void hci_conn_hash_init(struct hci_dev *hdev) | 437 | static inline void hci_conn_hash_init(struct hci_dev *hdev) |
@@ -640,6 +641,19 @@ static inline void hci_set_drvdata(struct hci_dev *hdev, void *data) | |||
640 | dev_set_drvdata(&hdev->dev, data); | 641 | dev_set_drvdata(&hdev->dev, data); |
641 | } | 642 | } |
642 | 643 | ||
644 | /* hci_dev_list shall be locked */ | ||
645 | static inline uint8_t __hci_num_ctrl(void) | ||
646 | { | ||
647 | uint8_t count = 0; | ||
648 | struct list_head *p; | ||
649 | |||
650 | list_for_each(p, &hci_dev_list) { | ||
651 | count++; | ||
652 | } | ||
653 | |||
654 | return count; | ||
655 | } | ||
656 | |||
643 | struct hci_dev *hci_dev_get(int index); | 657 | struct hci_dev *hci_dev_get(int index); |
644 | struct hci_dev *hci_get_route(bdaddr_t *src, bdaddr_t *dst); | 658 | struct hci_dev *hci_get_route(bdaddr_t *src, bdaddr_t *dst); |
645 | 659 | ||
@@ -661,7 +675,8 @@ int hci_get_conn_info(struct hci_dev *hdev, void __user *arg); | |||
661 | int hci_get_auth_info(struct hci_dev *hdev, void __user *arg); | 675 | int hci_get_auth_info(struct hci_dev *hdev, void __user *arg); |
662 | int hci_inquiry(void __user *arg); | 676 | int hci_inquiry(void __user *arg); |
663 | 677 | ||
664 | struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr); | 678 | struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, |
679 | bdaddr_t *bdaddr); | ||
665 | int hci_blacklist_clear(struct hci_dev *hdev); | 680 | int hci_blacklist_clear(struct hci_dev *hdev); |
666 | int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); | 681 | int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); |
667 | int hci_blacklist_del(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); | 682 | int hci_blacklist_del(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); |