aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2009-05-08 21:29:27 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-05-08 21:29:27 -0400
commitd585a021c0b10b0477d6b608c53e1feb8cde0507 (patch)
tree5ca059da1db7f15d4b29427644ad9c08270c885c /include/net/bluetooth
parent84e5b0d00f8f84c4ae226be131d4bebbcee88bd3 (diff)
parent091bf7624d1c90cec9e578a18529f615213ff847 (diff)
Merge commit 'v2.6.30-rc5' into next
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r--include/net/bluetooth/bluetooth.h12
-rw-r--r--include/net/bluetooth/hci.h9
-rw-r--r--include/net/bluetooth/hci_core.h93
-rw-r--r--include/net/bluetooth/l2cap.h13
-rw-r--r--include/net/bluetooth/rfcomm.h20
5 files changed, 106 insertions, 41 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index a04f8463ac7e..3ad5390a4dd5 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -53,6 +53,17 @@
53#define SOL_SCO 17 53#define SOL_SCO 17
54#define SOL_RFCOMM 18 54#define SOL_RFCOMM 18
55 55
56#define BT_SECURITY 4
57struct bt_security {
58 __u8 level;
59};
60#define BT_SECURITY_SDP 0
61#define BT_SECURITY_LOW 1
62#define BT_SECURITY_MEDIUM 2
63#define BT_SECURITY_HIGH 3
64
65#define BT_DEFER_SETUP 7
66
56#define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg) 67#define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg)
57#define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __func__ , ## arg) 68#define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __func__ , ## arg)
58#define BT_DBG(fmt, arg...) pr_debug("%s: " fmt "\n" , __func__ , ## arg) 69#define BT_DBG(fmt, arg...) pr_debug("%s: " fmt "\n" , __func__ , ## arg)
@@ -108,6 +119,7 @@ struct bt_sock {
108 bdaddr_t dst; 119 bdaddr_t dst;
109 struct list_head accept_q; 120 struct list_head accept_q;
110 struct sock *parent; 121 struct sock *parent;
122 u32 defer_setup;
111}; 123};
112 124
113struct bt_sock_list { 125struct bt_sock_list {
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 3645139e68c7..ed3aea1605e8 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -101,6 +101,7 @@ enum {
101/* HCI timeouts */ 101/* HCI timeouts */
102#define HCI_CONNECT_TIMEOUT (40000) /* 40 seconds */ 102#define HCI_CONNECT_TIMEOUT (40000) /* 40 seconds */
103#define HCI_DISCONN_TIMEOUT (2000) /* 2 seconds */ 103#define HCI_DISCONN_TIMEOUT (2000) /* 2 seconds */
104#define HCI_PAIRING_TIMEOUT (60000) /* 60 seconds */
104#define HCI_IDLE_TIMEOUT (6000) /* 6 seconds */ 105#define HCI_IDLE_TIMEOUT (6000) /* 6 seconds */
105#define HCI_INIT_TIMEOUT (10000) /* 10 seconds */ 106#define HCI_INIT_TIMEOUT (10000) /* 10 seconds */
106 107
@@ -133,8 +134,13 @@ enum {
133#define ESCO_EV3 0x0008 134#define ESCO_EV3 0x0008
134#define ESCO_EV4 0x0010 135#define ESCO_EV4 0x0010
135#define ESCO_EV5 0x0020 136#define ESCO_EV5 0x0020
137#define ESCO_2EV3 0x0040
138#define ESCO_3EV3 0x0080
139#define ESCO_2EV5 0x0100
140#define ESCO_3EV5 0x0200
136 141
137#define SCO_ESCO_MASK (ESCO_HV1 | ESCO_HV2 | ESCO_HV3) 142#define SCO_ESCO_MASK (ESCO_HV1 | ESCO_HV2 | ESCO_HV3)
143#define EDR_ESCO_MASK (ESCO_2EV3 | ESCO_3EV3 | ESCO_2EV5 | ESCO_3EV5)
138 144
139/* ACL flags */ 145/* ACL flags */
140#define ACL_CONT 0x01 146#define ACL_CONT 0x01
@@ -176,6 +182,9 @@ enum {
176#define LMP_EV5 0x02 182#define LMP_EV5 0x02
177 183
178#define LMP_SNIFF_SUBR 0x02 184#define LMP_SNIFF_SUBR 0x02
185#define LMP_EDR_ESCO_2M 0x20
186#define LMP_EDR_ESCO_3M 0x40
187#define LMP_EDR_3S_ESCO 0x80
179 188
180#define LMP_SIMPLE_PAIR 0x08 189#define LMP_SIMPLE_PAIR 0x08
181 190
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 46a43b721dd6..73aead222b32 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -169,7 +169,9 @@ struct hci_conn {
169 __u16 link_policy; 169 __u16 link_policy;
170 __u32 link_mode; 170 __u32 link_mode;
171 __u8 auth_type; 171 __u8 auth_type;
172 __u8 sec_level;
172 __u8 power_save; 173 __u8 power_save;
174 __u16 disc_timeout;
173 unsigned long pend; 175 unsigned long pend;
174 176
175 unsigned int sent; 177 unsigned int sent;
@@ -179,7 +181,8 @@ struct hci_conn {
179 struct timer_list disc_timer; 181 struct timer_list disc_timer;
180 struct timer_list idle_timer; 182 struct timer_list idle_timer;
181 183
182 struct work_struct work; 184 struct work_struct work_add;
185 struct work_struct work_del;
183 186
184 struct device dev; 187 struct device dev;
185 188
@@ -325,12 +328,11 @@ int hci_conn_del(struct hci_conn *conn);
325void hci_conn_hash_flush(struct hci_dev *hdev); 328void hci_conn_hash_flush(struct hci_dev *hdev);
326void hci_conn_check_pending(struct hci_dev *hdev); 329void hci_conn_check_pending(struct hci_dev *hdev);
327 330
328struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8 auth_type); 331struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8 sec_level, __u8 auth_type);
329int hci_conn_check_link_mode(struct hci_conn *conn); 332int hci_conn_check_link_mode(struct hci_conn *conn);
330int hci_conn_auth(struct hci_conn *conn); 333int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type);
331int hci_conn_encrypt(struct hci_conn *conn);
332int hci_conn_change_link_key(struct hci_conn *conn); 334int hci_conn_change_link_key(struct hci_conn *conn);
333int hci_conn_switch_role(struct hci_conn *conn, uint8_t role); 335int hci_conn_switch_role(struct hci_conn *conn, __u8 role);
334 336
335void hci_conn_enter_active_mode(struct hci_conn *conn); 337void hci_conn_enter_active_mode(struct hci_conn *conn);
336void hci_conn_enter_sniff_mode(struct hci_conn *conn); 338void hci_conn_enter_sniff_mode(struct hci_conn *conn);
@@ -348,9 +350,9 @@ static inline void hci_conn_put(struct hci_conn *conn)
348 if (conn->type == ACL_LINK) { 350 if (conn->type == ACL_LINK) {
349 del_timer(&conn->idle_timer); 351 del_timer(&conn->idle_timer);
350 if (conn->state == BT_CONNECTED) { 352 if (conn->state == BT_CONNECTED) {
351 timeo = msecs_to_jiffies(HCI_DISCONN_TIMEOUT); 353 timeo = msecs_to_jiffies(conn->disc_timeout);
352 if (!conn->out) 354 if (!conn->out)
353 timeo *= 5; 355 timeo *= 2;
354 } else 356 } else
355 timeo = msecs_to_jiffies(10); 357 timeo = msecs_to_jiffies(10);
356 } else 358 } else
@@ -455,6 +457,7 @@ int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count);
455 457
456int hci_register_sysfs(struct hci_dev *hdev); 458int hci_register_sysfs(struct hci_dev *hdev);
457void hci_unregister_sysfs(struct hci_dev *hdev); 459void hci_unregister_sysfs(struct hci_dev *hdev);
460void hci_conn_init_sysfs(struct hci_conn *conn);
458void hci_conn_add_sysfs(struct hci_conn *conn); 461void hci_conn_add_sysfs(struct hci_conn *conn);
459void hci_conn_del_sysfs(struct hci_conn *conn); 462void hci_conn_del_sysfs(struct hci_conn *conn);
460 463
@@ -470,26 +473,26 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
470 473
471/* ----- HCI protocols ----- */ 474/* ----- HCI protocols ----- */
472struct hci_proto { 475struct hci_proto {
473 char *name; 476 char *name;
474 unsigned int id; 477 unsigned int id;
475 unsigned long flags; 478 unsigned long flags;
476 479
477 void *priv; 480 void *priv;
478 481
479 int (*connect_ind) (struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type); 482 int (*connect_ind) (struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type);
480 int (*connect_cfm) (struct hci_conn *conn, __u8 status); 483 int (*connect_cfm) (struct hci_conn *conn, __u8 status);
481 int (*disconn_ind) (struct hci_conn *conn, __u8 reason); 484 int (*disconn_ind) (struct hci_conn *conn);
485 int (*disconn_cfm) (struct hci_conn *conn, __u8 reason);
482 int (*recv_acldata) (struct hci_conn *conn, struct sk_buff *skb, __u16 flags); 486 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); 487 int (*recv_scodata) (struct hci_conn *conn, struct sk_buff *skb);
484 int (*auth_cfm) (struct hci_conn *conn, __u8 status); 488 int (*security_cfm) (struct hci_conn *conn, __u8 status, __u8 encrypt);
485 int (*encrypt_cfm) (struct hci_conn *conn, __u8 status, __u8 encrypt);
486}; 489};
487 490
488static inline int hci_proto_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type) 491static inline int hci_proto_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type)
489{ 492{
490 register struct hci_proto *hp; 493 register struct hci_proto *hp;
491 int mask = 0; 494 int mask = 0;
492 495
493 hp = hci_proto[HCI_PROTO_L2CAP]; 496 hp = hci_proto[HCI_PROTO_L2CAP];
494 if (hp && hp->connect_ind) 497 if (hp && hp->connect_ind)
495 mask |= hp->connect_ind(hdev, bdaddr, type); 498 mask |= hp->connect_ind(hdev, bdaddr, type);
@@ -514,30 +517,52 @@ static inline void hci_proto_connect_cfm(struct hci_conn *conn, __u8 status)
514 hp->connect_cfm(conn, status); 517 hp->connect_cfm(conn, status);
515} 518}
516 519
517static inline void hci_proto_disconn_ind(struct hci_conn *conn, __u8 reason) 520static inline int hci_proto_disconn_ind(struct hci_conn *conn)
518{ 521{
519 register struct hci_proto *hp; 522 register struct hci_proto *hp;
523 int reason = 0x13;
520 524
521 hp = hci_proto[HCI_PROTO_L2CAP]; 525 hp = hci_proto[HCI_PROTO_L2CAP];
522 if (hp && hp->disconn_ind) 526 if (hp && hp->disconn_ind)
523 hp->disconn_ind(conn, reason); 527 reason = hp->disconn_ind(conn);
524 528
525 hp = hci_proto[HCI_PROTO_SCO]; 529 hp = hci_proto[HCI_PROTO_SCO];
526 if (hp && hp->disconn_ind) 530 if (hp && hp->disconn_ind)
527 hp->disconn_ind(conn, reason); 531 reason = hp->disconn_ind(conn);
532
533 return reason;
534}
535
536static inline void hci_proto_disconn_cfm(struct hci_conn *conn, __u8 reason)
537{
538 register struct hci_proto *hp;
539
540 hp = hci_proto[HCI_PROTO_L2CAP];
541 if (hp && hp->disconn_cfm)
542 hp->disconn_cfm(conn, reason);
543
544 hp = hci_proto[HCI_PROTO_SCO];
545 if (hp && hp->disconn_cfm)
546 hp->disconn_cfm(conn, reason);
528} 547}
529 548
530static inline void hci_proto_auth_cfm(struct hci_conn *conn, __u8 status) 549static inline void hci_proto_auth_cfm(struct hci_conn *conn, __u8 status)
531{ 550{
532 register struct hci_proto *hp; 551 register struct hci_proto *hp;
552 __u8 encrypt;
553
554 if (test_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend))
555 return;
556
557 encrypt = (conn->link_mode & HCI_LM_ENCRYPT) ? 0x01 : 0x00;
533 558
534 hp = hci_proto[HCI_PROTO_L2CAP]; 559 hp = hci_proto[HCI_PROTO_L2CAP];
535 if (hp && hp->auth_cfm) 560 if (hp && hp->security_cfm)
536 hp->auth_cfm(conn, status); 561 hp->security_cfm(conn, status, encrypt);
537 562
538 hp = hci_proto[HCI_PROTO_SCO]; 563 hp = hci_proto[HCI_PROTO_SCO];
539 if (hp && hp->auth_cfm) 564 if (hp && hp->security_cfm)
540 hp->auth_cfm(conn, status); 565 hp->security_cfm(conn, status, encrypt);
541} 566}
542 567
543static inline void hci_proto_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encrypt) 568static inline void hci_proto_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encrypt)
@@ -545,12 +570,12 @@ static inline void hci_proto_encrypt_cfm(struct hci_conn *conn, __u8 status, __u
545 register struct hci_proto *hp; 570 register struct hci_proto *hp;
546 571
547 hp = hci_proto[HCI_PROTO_L2CAP]; 572 hp = hci_proto[HCI_PROTO_L2CAP];
548 if (hp && hp->encrypt_cfm) 573 if (hp && hp->security_cfm)
549 hp->encrypt_cfm(conn, status, encrypt); 574 hp->security_cfm(conn, status, encrypt);
550 575
551 hp = hci_proto[HCI_PROTO_SCO]; 576 hp = hci_proto[HCI_PROTO_SCO];
552 if (hp && hp->encrypt_cfm) 577 if (hp && hp->security_cfm)
553 hp->encrypt_cfm(conn, status, encrypt); 578 hp->security_cfm(conn, status, encrypt);
554} 579}
555 580
556int hci_register_proto(struct hci_proto *hproto); 581int hci_register_proto(struct hci_proto *hproto);
@@ -562,8 +587,7 @@ struct hci_cb {
562 587
563 char *name; 588 char *name;
564 589
565 void (*auth_cfm) (struct hci_conn *conn, __u8 status); 590 void (*security_cfm) (struct hci_conn *conn, __u8 status, __u8 encrypt);
566 void (*encrypt_cfm) (struct hci_conn *conn, __u8 status, __u8 encrypt);
567 void (*key_change_cfm) (struct hci_conn *conn, __u8 status); 591 void (*key_change_cfm) (struct hci_conn *conn, __u8 status);
568 void (*role_switch_cfm) (struct hci_conn *conn, __u8 status, __u8 role); 592 void (*role_switch_cfm) (struct hci_conn *conn, __u8 status, __u8 role);
569}; 593};
@@ -571,14 +595,20 @@ struct hci_cb {
571static inline void hci_auth_cfm(struct hci_conn *conn, __u8 status) 595static inline void hci_auth_cfm(struct hci_conn *conn, __u8 status)
572{ 596{
573 struct list_head *p; 597 struct list_head *p;
598 __u8 encrypt;
574 599
575 hci_proto_auth_cfm(conn, status); 600 hci_proto_auth_cfm(conn, status);
576 601
602 if (test_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend))
603 return;
604
605 encrypt = (conn->link_mode & HCI_LM_ENCRYPT) ? 0x01 : 0x00;
606
577 read_lock_bh(&hci_cb_list_lock); 607 read_lock_bh(&hci_cb_list_lock);
578 list_for_each(p, &hci_cb_list) { 608 list_for_each(p, &hci_cb_list) {
579 struct hci_cb *cb = list_entry(p, struct hci_cb, list); 609 struct hci_cb *cb = list_entry(p, struct hci_cb, list);
580 if (cb->auth_cfm) 610 if (cb->security_cfm)
581 cb->auth_cfm(conn, status); 611 cb->security_cfm(conn, status, encrypt);
582 } 612 }
583 read_unlock_bh(&hci_cb_list_lock); 613 read_unlock_bh(&hci_cb_list_lock);
584} 614}
@@ -587,13 +617,16 @@ static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encr
587{ 617{
588 struct list_head *p; 618 struct list_head *p;
589 619
620 if (conn->sec_level == BT_SECURITY_SDP)
621 conn->sec_level = BT_SECURITY_LOW;
622
590 hci_proto_encrypt_cfm(conn, status, encrypt); 623 hci_proto_encrypt_cfm(conn, status, encrypt);
591 624
592 read_lock_bh(&hci_cb_list_lock); 625 read_lock_bh(&hci_cb_list_lock);
593 list_for_each(p, &hci_cb_list) { 626 list_for_each(p, &hci_cb_list) {
594 struct hci_cb *cb = list_entry(p, struct hci_cb, list); 627 struct hci_cb *cb = list_entry(p, struct hci_cb, list);
595 if (cb->encrypt_cfm) 628 if (cb->security_cfm)
596 cb->encrypt_cfm(conn, status, encrypt); 629 cb->security_cfm(conn, status, encrypt);
597 } 630 }
598 read_unlock_bh(&hci_cb_list_lock); 631 read_unlock_bh(&hci_cb_list_lock);
599} 632}
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 73e115bc12dd..f566aa1f0a4c 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -37,6 +37,7 @@ struct sockaddr_l2 {
37 sa_family_t l2_family; 37 sa_family_t l2_family;
38 __le16 l2_psm; 38 __le16 l2_psm;
39 bdaddr_t l2_bdaddr; 39 bdaddr_t l2_bdaddr;
40 __le16 l2_cid;
40}; 41};
41 42
42/* L2CAP socket options */ 43/* L2CAP socket options */
@@ -185,6 +186,7 @@ struct l2cap_info_rsp {
185/* info type */ 186/* info type */
186#define L2CAP_IT_CL_MTU 0x0001 187#define L2CAP_IT_CL_MTU 0x0001
187#define L2CAP_IT_FEAT_MASK 0x0002 188#define L2CAP_IT_FEAT_MASK 0x0002
189#define L2CAP_IT_FIXED_CHAN 0x0003
188 190
189/* info result */ 191/* info result */
190#define L2CAP_IR_SUCCESS 0x0000 192#define L2CAP_IR_SUCCESS 0x0000
@@ -219,11 +221,14 @@ struct l2cap_conn {
219 __u8 rx_ident; 221 __u8 rx_ident;
220 __u8 tx_ident; 222 __u8 tx_ident;
221 223
224 __u8 disc_reason;
225
222 struct l2cap_chan_list chan_list; 226 struct l2cap_chan_list chan_list;
223}; 227};
224 228
225#define L2CAP_INFO_CL_MTU_REQ_SENT 0x01 229#define L2CAP_INFO_CL_MTU_REQ_SENT 0x01
226#define L2CAP_INFO_FEAT_MASK_REQ_SENT 0x02 230#define L2CAP_INFO_FEAT_MASK_REQ_SENT 0x04
231#define L2CAP_INFO_FEAT_MASK_REQ_DONE 0x08
227 232
228/* ----- L2CAP channel and socket info ----- */ 233/* ----- L2CAP channel and socket info ----- */
229#define l2cap_pi(sk) ((struct l2cap_pinfo *) sk) 234#define l2cap_pi(sk) ((struct l2cap_pinfo *) sk)
@@ -237,8 +242,9 @@ struct l2cap_pinfo {
237 __u16 imtu; 242 __u16 imtu;
238 __u16 omtu; 243 __u16 omtu;
239 __u16 flush_to; 244 __u16 flush_to;
240 245 __u8 sec_level;
241 __u32 link_mode; 246 __u8 role_switch;
247 __u8 force_reliable;
242 248
243 __u8 conf_req[64]; 249 __u8 conf_req[64];
244 __u8 conf_len; 250 __u8 conf_len;
@@ -257,6 +263,7 @@ struct l2cap_pinfo {
257#define L2CAP_CONF_REQ_SENT 0x01 263#define L2CAP_CONF_REQ_SENT 0x01
258#define L2CAP_CONF_INPUT_DONE 0x02 264#define L2CAP_CONF_INPUT_DONE 0x02
259#define L2CAP_CONF_OUTPUT_DONE 0x04 265#define L2CAP_CONF_OUTPUT_DONE 0x04
266#define L2CAP_CONF_CONNECT_PEND 0x80
260 267
261#define L2CAP_CONF_MAX_RETRIES 2 268#define L2CAP_CONF_MAX_RETRIES 2
262 269
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h
index 4dc8d92a4638..80072611d26a 100644
--- a/include/net/bluetooth/rfcomm.h
+++ b/include/net/bluetooth/rfcomm.h
@@ -183,8 +183,9 @@ struct rfcomm_dlc {
183 u8 remote_v24_sig; 183 u8 remote_v24_sig;
184 u8 mscex; 184 u8 mscex;
185 u8 out; 185 u8 out;
186 186 u8 sec_level;
187 u32 link_mode; 187 u8 role_switch;
188 u32 defer_setup;
188 189
189 uint mtu; 190 uint mtu;
190 uint cfc; 191 uint cfc;
@@ -202,10 +203,12 @@ struct rfcomm_dlc {
202#define RFCOMM_RX_THROTTLED 0 203#define RFCOMM_RX_THROTTLED 0
203#define RFCOMM_TX_THROTTLED 1 204#define RFCOMM_TX_THROTTLED 1
204#define RFCOMM_TIMED_OUT 2 205#define RFCOMM_TIMED_OUT 2
205#define RFCOMM_MSC_PENDING 3 206#define RFCOMM_MSC_PENDING 3
206#define RFCOMM_AUTH_PENDING 4 207#define RFCOMM_SEC_PENDING 4
207#define RFCOMM_AUTH_ACCEPT 5 208#define RFCOMM_AUTH_PENDING 5
208#define RFCOMM_AUTH_REJECT 6 209#define RFCOMM_AUTH_ACCEPT 6
210#define RFCOMM_AUTH_REJECT 7
211#define RFCOMM_DEFER_SETUP 8
209 212
210/* Scheduling flags and events */ 213/* Scheduling flags and events */
211#define RFCOMM_SCHED_STATE 0 214#define RFCOMM_SCHED_STATE 0
@@ -239,6 +242,7 @@ int rfcomm_dlc_close(struct rfcomm_dlc *d, int reason);
239int rfcomm_dlc_send(struct rfcomm_dlc *d, struct sk_buff *skb); 242int rfcomm_dlc_send(struct rfcomm_dlc *d, struct sk_buff *skb);
240int rfcomm_dlc_set_modem_status(struct rfcomm_dlc *d, u8 v24_sig); 243int rfcomm_dlc_set_modem_status(struct rfcomm_dlc *d, u8 v24_sig);
241int rfcomm_dlc_get_modem_status(struct rfcomm_dlc *d, u8 *v24_sig); 244int rfcomm_dlc_get_modem_status(struct rfcomm_dlc *d, u8 *v24_sig);
245void rfcomm_dlc_accept(struct rfcomm_dlc *d);
242 246
243#define rfcomm_dlc_lock(d) spin_lock(&d->lock) 247#define rfcomm_dlc_lock(d) spin_lock(&d->lock)
244#define rfcomm_dlc_unlock(d) spin_unlock(&d->lock) 248#define rfcomm_dlc_unlock(d) spin_unlock(&d->lock)
@@ -304,7 +308,8 @@ struct rfcomm_pinfo {
304 struct bt_sock bt; 308 struct bt_sock bt;
305 struct rfcomm_dlc *dlc; 309 struct rfcomm_dlc *dlc;
306 u8 channel; 310 u8 channel;
307 u32 link_mode; 311 u8 sec_level;
312 u8 role_switch;
308}; 313};
309 314
310int rfcomm_init_sockets(void); 315int rfcomm_init_sockets(void);
@@ -333,7 +338,6 @@ struct rfcomm_dev_req {
333 bdaddr_t src; 338 bdaddr_t src;
334 bdaddr_t dst; 339 bdaddr_t dst;
335 u8 channel; 340 u8 channel;
336
337}; 341};
338 342
339struct rfcomm_dev_info { 343struct rfcomm_dev_info {