diff options
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 25 | ||||
-rw-r--r-- | include/net/bluetooth/l2cap.h | 2 |
2 files changed, 23 insertions, 4 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 9473fce499e7..01f9316b4c23 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -478,7 +478,8 @@ struct hci_proto { | |||
478 | 478 | ||
479 | int (*connect_ind) (struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type); | 479 | int (*connect_ind) (struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type); |
480 | int (*connect_cfm) (struct hci_conn *conn, __u8 status); | 480 | int (*connect_cfm) (struct hci_conn *conn, __u8 status); |
481 | int (*disconn_ind) (struct hci_conn *conn, __u8 reason); | 481 | int (*disconn_ind) (struct hci_conn *conn); |
482 | int (*disconn_cfm) (struct hci_conn *conn, __u8 reason); | ||
482 | int (*recv_acldata) (struct hci_conn *conn, struct sk_buff *skb, __u16 flags); | 483 | int (*recv_acldata) (struct hci_conn *conn, struct sk_buff *skb, __u16 flags); |
483 | int (*recv_scodata) (struct hci_conn *conn, struct sk_buff *skb); | 484 | int (*recv_scodata) (struct hci_conn *conn, struct sk_buff *skb); |
484 | int (*security_cfm) (struct hci_conn *conn, __u8 status, __u8 encrypt); | 485 | int (*security_cfm) (struct hci_conn *conn, __u8 status, __u8 encrypt); |
@@ -513,17 +514,33 @@ static inline void hci_proto_connect_cfm(struct hci_conn *conn, __u8 status) | |||
513 | hp->connect_cfm(conn, status); | 514 | hp->connect_cfm(conn, status); |
514 | } | 515 | } |
515 | 516 | ||
516 | static inline void hci_proto_disconn_ind(struct hci_conn *conn, __u8 reason) | 517 | static inline int hci_proto_disconn_ind(struct hci_conn *conn) |
517 | { | 518 | { |
518 | register struct hci_proto *hp; | 519 | register struct hci_proto *hp; |
520 | int reason = 0x13; | ||
519 | 521 | ||
520 | hp = hci_proto[HCI_PROTO_L2CAP]; | 522 | hp = hci_proto[HCI_PROTO_L2CAP]; |
521 | if (hp && hp->disconn_ind) | 523 | if (hp && hp->disconn_ind) |
522 | hp->disconn_ind(conn, reason); | 524 | reason = hp->disconn_ind(conn); |
523 | 525 | ||
524 | hp = hci_proto[HCI_PROTO_SCO]; | 526 | hp = hci_proto[HCI_PROTO_SCO]; |
525 | if (hp && hp->disconn_ind) | 527 | if (hp && hp->disconn_ind) |
526 | hp->disconn_ind(conn, reason); | 528 | reason = hp->disconn_ind(conn); |
529 | |||
530 | return reason; | ||
531 | } | ||
532 | |||
533 | static inline void hci_proto_disconn_cfm(struct hci_conn *conn, __u8 reason) | ||
534 | { | ||
535 | register struct hci_proto *hp; | ||
536 | |||
537 | hp = hci_proto[HCI_PROTO_L2CAP]; | ||
538 | if (hp && hp->disconn_cfm) | ||
539 | hp->disconn_cfm(conn, reason); | ||
540 | |||
541 | hp = hci_proto[HCI_PROTO_SCO]; | ||
542 | if (hp && hp->disconn_cfm) | ||
543 | hp->disconn_cfm(conn, reason); | ||
527 | } | 544 | } |
528 | 545 | ||
529 | static inline void hci_proto_auth_cfm(struct hci_conn *conn, __u8 status) | 546 | static inline void hci_proto_auth_cfm(struct hci_conn *conn, __u8 status) |
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 54737c5dc86c..f566aa1f0a4c 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -221,6 +221,8 @@ struct l2cap_conn { | |||
221 | __u8 rx_ident; | 221 | __u8 rx_ident; |
222 | __u8 tx_ident; | 222 | __u8 tx_ident; |
223 | 223 | ||
224 | __u8 disc_reason; | ||
225 | |||
224 | struct l2cap_chan_list chan_list; | 226 | struct l2cap_chan_list chan_list; |
225 | }; | 227 | }; |
226 | 228 | ||