diff options
Diffstat (limited to 'include/net/bluetooth/l2cap.h')
-rw-r--r-- | include/net/bluetooth/l2cap.h | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 1a966afbbfa8..c853b16de4ef 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -131,6 +131,7 @@ struct l2cap_conninfo { | |||
131 | 131 | ||
132 | /* L2CAP fixed channels */ | 132 | /* L2CAP fixed channels */ |
133 | #define L2CAP_FC_L2CAP 0x02 | 133 | #define L2CAP_FC_L2CAP 0x02 |
134 | #define L2CAP_FC_CONNLESS 0x04 | ||
134 | #define L2CAP_FC_A2MP 0x08 | 135 | #define L2CAP_FC_A2MP 0x08 |
135 | 136 | ||
136 | /* L2CAP Control Field bit masks */ | 137 | /* L2CAP Control Field bit masks */ |
@@ -237,8 +238,9 @@ struct l2cap_conn_rsp { | |||
237 | /* protocol/service multiplexer (PSM) */ | 238 | /* protocol/service multiplexer (PSM) */ |
238 | #define L2CAP_PSM_SDP 0x0001 | 239 | #define L2CAP_PSM_SDP 0x0001 |
239 | #define L2CAP_PSM_RFCOMM 0x0003 | 240 | #define L2CAP_PSM_RFCOMM 0x0003 |
241 | #define L2CAP_PSM_3DSP 0x0021 | ||
240 | 242 | ||
241 | /* channel indentifier */ | 243 | /* channel identifier */ |
242 | #define L2CAP_CID_SIGNALING 0x0001 | 244 | #define L2CAP_CID_SIGNALING 0x0001 |
243 | #define L2CAP_CID_CONN_LESS 0x0002 | 245 | #define L2CAP_CID_CONN_LESS 0x0002 |
244 | #define L2CAP_CID_A2MP 0x0003 | 246 | #define L2CAP_CID_A2MP 0x0003 |
@@ -433,8 +435,6 @@ struct l2cap_seq_list { | |||
433 | #define L2CAP_SEQ_LIST_TAIL 0x8000 | 435 | #define L2CAP_SEQ_LIST_TAIL 0x8000 |
434 | 436 | ||
435 | struct l2cap_chan { | 437 | struct l2cap_chan { |
436 | struct sock *sk; | ||
437 | |||
438 | struct l2cap_conn *conn; | 438 | struct l2cap_conn *conn; |
439 | struct hci_conn *hs_hcon; | 439 | struct hci_conn *hs_hcon; |
440 | struct hci_chan *hs_hchan; | 440 | struct hci_chan *hs_hchan; |
@@ -442,7 +442,12 @@ struct l2cap_chan { | |||
442 | 442 | ||
443 | __u8 state; | 443 | __u8 state; |
444 | 444 | ||
445 | bdaddr_t dst; | ||
446 | __u8 dst_type; | ||
447 | bdaddr_t src; | ||
448 | __u8 src_type; | ||
445 | __le16 psm; | 449 | __le16 psm; |
450 | __le16 sport; | ||
446 | __u16 dcid; | 451 | __u16 dcid; |
447 | __u16 scid; | 452 | __u16 scid; |
448 | 453 | ||
@@ -453,8 +458,6 @@ struct l2cap_chan { | |||
453 | __u8 chan_type; | 458 | __u8 chan_type; |
454 | __u8 chan_policy; | 459 | __u8 chan_policy; |
455 | 460 | ||
456 | __le16 sport; | ||
457 | |||
458 | __u8 sec_level; | 461 | __u8 sec_level; |
459 | 462 | ||
460 | __u8 ident; | 463 | __u8 ident; |
@@ -546,9 +549,12 @@ struct l2cap_ops { | |||
546 | void (*teardown) (struct l2cap_chan *chan, int err); | 549 | void (*teardown) (struct l2cap_chan *chan, int err); |
547 | void (*close) (struct l2cap_chan *chan); | 550 | void (*close) (struct l2cap_chan *chan); |
548 | void (*state_change) (struct l2cap_chan *chan, | 551 | void (*state_change) (struct l2cap_chan *chan, |
549 | int state); | 552 | int state, int err); |
550 | void (*ready) (struct l2cap_chan *chan); | 553 | void (*ready) (struct l2cap_chan *chan); |
551 | void (*defer) (struct l2cap_chan *chan); | 554 | void (*defer) (struct l2cap_chan *chan); |
555 | void (*resume) (struct l2cap_chan *chan); | ||
556 | void (*set_shutdown) (struct l2cap_chan *chan); | ||
557 | long (*get_sndtimeo) (struct l2cap_chan *chan); | ||
552 | struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan, | 558 | struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan, |
553 | unsigned long len, int nb); | 559 | unsigned long len, int nb); |
554 | }; | 560 | }; |
@@ -557,13 +563,11 @@ struct l2cap_conn { | |||
557 | struct hci_conn *hcon; | 563 | struct hci_conn *hcon; |
558 | struct hci_chan *hchan; | 564 | struct hci_chan *hchan; |
559 | 565 | ||
560 | bdaddr_t *dst; | ||
561 | bdaddr_t *src; | ||
562 | |||
563 | unsigned int mtu; | 566 | unsigned int mtu; |
564 | 567 | ||
565 | __u32 feat_mask; | 568 | __u32 feat_mask; |
566 | __u8 fixed_chan_mask; | 569 | __u8 fixed_chan_mask; |
570 | bool hs_enabled; | ||
567 | 571 | ||
568 | __u8 info_state; | 572 | __u8 info_state; |
569 | __u8 info_ident; | 573 | __u8 info_ident; |
@@ -649,6 +653,7 @@ enum { | |||
649 | FLAG_FLUSHABLE, | 653 | FLAG_FLUSHABLE, |
650 | FLAG_EXT_CTRL, | 654 | FLAG_EXT_CTRL, |
651 | FLAG_EFS_ENABLE, | 655 | FLAG_EFS_ENABLE, |
656 | FLAG_DEFER_SETUP, | ||
652 | }; | 657 | }; |
653 | 658 | ||
654 | enum { | 659 | enum { |
@@ -790,6 +795,19 @@ static inline void l2cap_chan_no_defer(struct l2cap_chan *chan) | |||
790 | { | 795 | { |
791 | } | 796 | } |
792 | 797 | ||
798 | static inline void l2cap_chan_no_resume(struct l2cap_chan *chan) | ||
799 | { | ||
800 | } | ||
801 | |||
802 | static inline void l2cap_chan_no_set_shutdown(struct l2cap_chan *chan) | ||
803 | { | ||
804 | } | ||
805 | |||
806 | static inline long l2cap_chan_no_get_sndtimeo(struct l2cap_chan *chan) | ||
807 | { | ||
808 | return 0; | ||
809 | } | ||
810 | |||
793 | extern bool disable_ertm; | 811 | extern bool disable_ertm; |
794 | 812 | ||
795 | int l2cap_init_sockets(void); | 813 | int l2cap_init_sockets(void); |
@@ -797,7 +815,6 @@ void l2cap_cleanup_sockets(void); | |||
797 | bool l2cap_is_socket(struct socket *sock); | 815 | bool l2cap_is_socket(struct socket *sock); |
798 | 816 | ||
799 | void __l2cap_connect_rsp_defer(struct l2cap_chan *chan); | 817 | void __l2cap_connect_rsp_defer(struct l2cap_chan *chan); |
800 | int __l2cap_wait_ack(struct sock *sk); | ||
801 | 818 | ||
802 | int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm); | 819 | int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm); |
803 | int l2cap_add_scid(struct l2cap_chan *chan, __u16 scid); | 820 | int l2cap_add_scid(struct l2cap_chan *chan, __u16 scid); |