diff options
Diffstat (limited to 'include/net/bluetooth/hci_core.h')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index d5d8454236bf..441dadbf6a89 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -248,6 +248,10 @@ struct hci_conn { | |||
248 | void *priv; | 248 | void *priv; |
249 | 249 | ||
250 | struct hci_conn *link; | 250 | struct hci_conn *link; |
251 | |||
252 | void (*connect_cfm_cb) (struct hci_conn *conn, u8 status); | ||
253 | void (*security_cfm_cb) (struct hci_conn *conn, u8 status); | ||
254 | void (*disconn_cfm_cb) (struct hci_conn *conn, u8 reason); | ||
251 | }; | 255 | }; |
252 | 256 | ||
253 | extern struct hci_proto *hci_proto[]; | 257 | extern struct hci_proto *hci_proto[]; |
@@ -571,6 +575,9 @@ static inline void hci_proto_connect_cfm(struct hci_conn *conn, __u8 status) | |||
571 | hp = hci_proto[HCI_PROTO_SCO]; | 575 | hp = hci_proto[HCI_PROTO_SCO]; |
572 | if (hp && hp->connect_cfm) | 576 | if (hp && hp->connect_cfm) |
573 | hp->connect_cfm(conn, status); | 577 | hp->connect_cfm(conn, status); |
578 | |||
579 | if (conn->connect_cfm_cb) | ||
580 | conn->connect_cfm_cb(conn, status); | ||
574 | } | 581 | } |
575 | 582 | ||
576 | static inline int hci_proto_disconn_ind(struct hci_conn *conn) | 583 | static inline int hci_proto_disconn_ind(struct hci_conn *conn) |
@@ -600,6 +607,9 @@ static inline void hci_proto_disconn_cfm(struct hci_conn *conn, __u8 reason) | |||
600 | hp = hci_proto[HCI_PROTO_SCO]; | 607 | hp = hci_proto[HCI_PROTO_SCO]; |
601 | if (hp && hp->disconn_cfm) | 608 | if (hp && hp->disconn_cfm) |
602 | hp->disconn_cfm(conn, reason); | 609 | hp->disconn_cfm(conn, reason); |
610 | |||
611 | if (conn->disconn_cfm_cb) | ||
612 | conn->disconn_cfm_cb(conn, reason); | ||
603 | } | 613 | } |
604 | 614 | ||
605 | static inline void hci_proto_auth_cfm(struct hci_conn *conn, __u8 status) | 615 | static inline void hci_proto_auth_cfm(struct hci_conn *conn, __u8 status) |
@@ -619,6 +629,9 @@ static inline void hci_proto_auth_cfm(struct hci_conn *conn, __u8 status) | |||
619 | hp = hci_proto[HCI_PROTO_SCO]; | 629 | hp = hci_proto[HCI_PROTO_SCO]; |
620 | if (hp && hp->security_cfm) | 630 | if (hp && hp->security_cfm) |
621 | hp->security_cfm(conn, status, encrypt); | 631 | hp->security_cfm(conn, status, encrypt); |
632 | |||
633 | if (conn->security_cfm_cb) | ||
634 | conn->security_cfm_cb(conn, status); | ||
622 | } | 635 | } |
623 | 636 | ||
624 | static inline void hci_proto_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encrypt) | 637 | static inline void hci_proto_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encrypt) |
@@ -632,6 +645,9 @@ static inline void hci_proto_encrypt_cfm(struct hci_conn *conn, __u8 status, __u | |||
632 | hp = hci_proto[HCI_PROTO_SCO]; | 645 | hp = hci_proto[HCI_PROTO_SCO]; |
633 | if (hp && hp->security_cfm) | 646 | if (hp && hp->security_cfm) |
634 | hp->security_cfm(conn, status, encrypt); | 647 | hp->security_cfm(conn, status, encrypt); |
648 | |||
649 | if (conn->security_cfm_cb) | ||
650 | conn->security_cfm_cb(conn, status); | ||
635 | } | 651 | } |
636 | 652 | ||
637 | int hci_register_proto(struct hci_proto *hproto); | 653 | int hci_register_proto(struct hci_proto *hproto); |
@@ -746,6 +762,11 @@ int mgmt_connect_failed(u16 index, bdaddr_t *bdaddr, u8 status); | |||
746 | int mgmt_pin_code_request(u16 index, bdaddr_t *bdaddr); | 762 | int mgmt_pin_code_request(u16 index, bdaddr_t *bdaddr); |
747 | int mgmt_pin_code_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status); | 763 | int mgmt_pin_code_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status); |
748 | int mgmt_pin_code_neg_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status); | 764 | int mgmt_pin_code_neg_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status); |
765 | int mgmt_user_confirm_request(u16 index, bdaddr_t *bdaddr, __le32 value); | ||
766 | int mgmt_user_confirm_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status); | ||
767 | int mgmt_user_confirm_neg_reply_complete(u16 index, bdaddr_t *bdaddr, | ||
768 | u8 status); | ||
769 | int mgmt_auth_failed(u16 index, bdaddr_t *bdaddr, u8 status); | ||
749 | 770 | ||
750 | /* HCI info for socket */ | 771 | /* HCI info for socket */ |
751 | #define hci_pi(sk) ((struct hci_pinfo *) sk) | 772 | #define hci_pi(sk) ((struct hci_pinfo *) sk) |