diff options
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index b6bca64b320d..b0ad2c752d73 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include "smp.h" | 40 | #include "smp.h" |
41 | #include "a2mp.h" | 41 | #include "a2mp.h" |
42 | #include "amp.h" | 42 | #include "amp.h" |
43 | #include "6lowpan.h" | ||
43 | 44 | ||
44 | bool disable_ertm; | 45 | bool disable_ertm; |
45 | 46 | ||
@@ -1468,6 +1469,8 @@ static void l2cap_le_conn_ready(struct l2cap_conn *conn) | |||
1468 | 1469 | ||
1469 | BT_DBG(""); | 1470 | BT_DBG(""); |
1470 | 1471 | ||
1472 | bt_6lowpan_add_conn(conn); | ||
1473 | |||
1471 | /* Check if we have socket listening on cid */ | 1474 | /* Check if we have socket listening on cid */ |
1472 | pchan = l2cap_global_chan_by_scid(BT_LISTEN, L2CAP_CID_ATT, | 1475 | pchan = l2cap_global_chan_by_scid(BT_LISTEN, L2CAP_CID_ATT, |
1473 | &hcon->src, &hcon->dst); | 1476 | &hcon->src, &hcon->dst); |
@@ -7119,6 +7122,10 @@ static void l2cap_recv_frame(struct l2cap_conn *conn, struct sk_buff *skb) | |||
7119 | l2cap_conn_del(conn->hcon, EACCES); | 7122 | l2cap_conn_del(conn->hcon, EACCES); |
7120 | break; | 7123 | break; |
7121 | 7124 | ||
7125 | case L2CAP_FC_6LOWPAN: | ||
7126 | bt_6lowpan_recv(conn, skb); | ||
7127 | break; | ||
7128 | |||
7122 | default: | 7129 | default: |
7123 | l2cap_data_channel(conn, cid, skb); | 7130 | l2cap_data_channel(conn, cid, skb); |
7124 | break; | 7131 | break; |
@@ -7186,6 +7193,8 @@ void l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason) | |||
7186 | { | 7193 | { |
7187 | BT_DBG("hcon %p reason %d", hcon, reason); | 7194 | BT_DBG("hcon %p reason %d", hcon, reason); |
7188 | 7195 | ||
7196 | bt_6lowpan_del_conn(hcon->l2cap_data); | ||
7197 | |||
7189 | l2cap_conn_del(hcon, bt_to_errno(reason)); | 7198 | l2cap_conn_del(hcon, bt_to_errno(reason)); |
7190 | } | 7199 | } |
7191 | 7200 | ||
@@ -7467,11 +7476,14 @@ int __init l2cap_init(void) | |||
7467 | debugfs_create_u16("l2cap_le_default_mps", 0466, bt_debugfs, | 7476 | debugfs_create_u16("l2cap_le_default_mps", 0466, bt_debugfs, |
7468 | &le_default_mps); | 7477 | &le_default_mps); |
7469 | 7478 | ||
7479 | bt_6lowpan_init(); | ||
7480 | |||
7470 | return 0; | 7481 | return 0; |
7471 | } | 7482 | } |
7472 | 7483 | ||
7473 | void l2cap_exit(void) | 7484 | void l2cap_exit(void) |
7474 | { | 7485 | { |
7486 | bt_6lowpan_cleanup(); | ||
7475 | debugfs_remove(l2cap_debugfs); | 7487 | debugfs_remove(l2cap_debugfs); |
7476 | l2cap_cleanup_sockets(); | 7488 | l2cap_cleanup_sockets(); |
7477 | } | 7489 | } |