diff options
-rw-r--r-- | include/net/bluetooth/l2cap.h | 4 | ||||
-rw-r--r-- | net/bluetooth/l2cap_core.c | 25 |
2 files changed, 0 insertions, 29 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 8f1652ed3326..be25eddea615 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -625,9 +625,6 @@ struct l2cap_conn { | |||
625 | 625 | ||
626 | struct delayed_work info_timer; | 626 | struct delayed_work info_timer; |
627 | 627 | ||
628 | int disconn_err; | ||
629 | struct work_struct disconn_work; | ||
630 | |||
631 | struct sk_buff *rx_skb; | 628 | struct sk_buff *rx_skb; |
632 | __u32 rx_len; | 629 | __u32 rx_len; |
633 | __u8 tx_ident; | 630 | __u8 tx_ident; |
@@ -947,7 +944,6 @@ void l2cap_logical_cfm(struct l2cap_chan *chan, struct hci_chan *hchan, | |||
947 | u8 status); | 944 | u8 status); |
948 | void __l2cap_physical_cfm(struct l2cap_chan *chan, int result); | 945 | void __l2cap_physical_cfm(struct l2cap_chan *chan, int result); |
949 | 946 | ||
950 | void l2cap_conn_shutdown(struct l2cap_conn *conn, int err); | ||
951 | struct l2cap_conn *l2cap_conn_get(struct l2cap_conn *conn); | 947 | struct l2cap_conn *l2cap_conn_get(struct l2cap_conn *conn); |
952 | void l2cap_conn_put(struct l2cap_conn *conn); | 948 | void l2cap_conn_put(struct l2cap_conn *conn); |
953 | 949 | ||
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 2d550afe4322..2d9a2b58d2c8 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -1635,9 +1635,6 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err) | |||
1635 | if (work_pending(&conn->pending_rx_work)) | 1635 | if (work_pending(&conn->pending_rx_work)) |
1636 | cancel_work_sync(&conn->pending_rx_work); | 1636 | cancel_work_sync(&conn->pending_rx_work); |
1637 | 1637 | ||
1638 | if (work_pending(&conn->disconn_work)) | ||
1639 | cancel_work_sync(&conn->disconn_work); | ||
1640 | |||
1641 | l2cap_unregister_all_users(conn); | 1638 | l2cap_unregister_all_users(conn); |
1642 | 1639 | ||
1643 | /* Force the connection to be immediately dropped */ | 1640 | /* Force the connection to be immediately dropped */ |
@@ -1670,26 +1667,6 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err) | |||
1670 | l2cap_conn_put(conn); | 1667 | l2cap_conn_put(conn); |
1671 | } | 1668 | } |
1672 | 1669 | ||
1673 | static void disconn_work(struct work_struct *work) | ||
1674 | { | ||
1675 | struct l2cap_conn *conn = container_of(work, struct l2cap_conn, | ||
1676 | disconn_work); | ||
1677 | |||
1678 | BT_DBG("conn %p", conn); | ||
1679 | |||
1680 | l2cap_conn_del(conn->hcon, conn->disconn_err); | ||
1681 | } | ||
1682 | |||
1683 | void l2cap_conn_shutdown(struct l2cap_conn *conn, int err) | ||
1684 | { | ||
1685 | struct hci_dev *hdev = conn->hcon->hdev; | ||
1686 | |||
1687 | BT_DBG("conn %p err %d", conn, err); | ||
1688 | |||
1689 | conn->disconn_err = err; | ||
1690 | queue_work(hdev->workqueue, &conn->disconn_work); | ||
1691 | } | ||
1692 | |||
1693 | static void l2cap_conn_free(struct kref *ref) | 1670 | static void l2cap_conn_free(struct kref *ref) |
1694 | { | 1671 | { |
1695 | struct l2cap_conn *conn = container_of(ref, struct l2cap_conn, ref); | 1672 | struct l2cap_conn *conn = container_of(ref, struct l2cap_conn, ref); |
@@ -6943,8 +6920,6 @@ static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon) | |||
6943 | 6920 | ||
6944 | INIT_DELAYED_WORK(&conn->info_timer, l2cap_info_timeout); | 6921 | INIT_DELAYED_WORK(&conn->info_timer, l2cap_info_timeout); |
6945 | 6922 | ||
6946 | INIT_WORK(&conn->disconn_work, disconn_work); | ||
6947 | |||
6948 | skb_queue_head_init(&conn->pending_rx); | 6923 | skb_queue_head_init(&conn->pending_rx); |
6949 | INIT_WORK(&conn->pending_rx_work, process_pending_rx); | 6924 | INIT_WORK(&conn->pending_rx_work, process_pending_rx); |
6950 | 6925 | ||