aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-08-11 15:06:41 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-08-14 02:49:24 -0400
commit276d807317dead63ef2f13aa46e3c17d57ba0713 (patch)
tree719ae8337895f40404e3f01a0823c3b89dd678e5
parentb68fda6848ebef3499905500971d40b84faa8319 (diff)
Bluetooth: Remove unused l2cap_conn->security_timer
Now that there are no-longer any users for l2cap_conn->security_timer we can go ahead and simply remove it. The patch makes initialization of the conn->info_timer unconditional since it's better not to leave any l2cap_conn data structures uninitialized no matter what the underlying transport. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r--include/net/bluetooth/l2cap.h1
-rw-r--r--net/bluetooth/l2cap_core.c18
2 files changed, 1 insertions, 18 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 40f34866b6da..cedda399f9c0 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -638,7 +638,6 @@ struct l2cap_conn {
638 638
639 __u8 disc_reason; 639 __u8 disc_reason;
640 640
641 struct delayed_work security_timer;
642 struct l2cap_chan *smp; 641 struct l2cap_chan *smp;
643 642
644 struct list_head chan_l; 643 struct list_head chan_l;
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 404998efa7e2..0cd7ed99558b 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1659,19 +1659,6 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err)
1659 l2cap_conn_put(conn); 1659 l2cap_conn_put(conn);
1660} 1660}
1661 1661
1662static void security_timeout(struct work_struct *work)
1663{
1664 struct l2cap_conn *conn = container_of(work, struct l2cap_conn,
1665 security_timer.work);
1666
1667 BT_DBG("conn %p", conn);
1668
1669 if (test_and_clear_bit(HCI_CONN_LE_SMP_PEND, &conn->hcon->flags)) {
1670 smp_chan_destroy(conn);
1671 l2cap_conn_del(conn->hcon, ETIMEDOUT);
1672 }
1673}
1674
1675static void disconn_work(struct work_struct *work) 1662static void disconn_work(struct work_struct *work)
1676{ 1663{
1677 struct l2cap_conn *conn = container_of(work, struct l2cap_conn, 1664 struct l2cap_conn *conn = container_of(work, struct l2cap_conn,
@@ -6948,10 +6935,7 @@ static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon)
6948 INIT_LIST_HEAD(&conn->chan_l); 6935 INIT_LIST_HEAD(&conn->chan_l);
6949 INIT_LIST_HEAD(&conn->users); 6936 INIT_LIST_HEAD(&conn->users);
6950 6937
6951 if (hcon->type == LE_LINK) 6938 INIT_DELAYED_WORK(&conn->info_timer, l2cap_info_timeout);
6952 INIT_DELAYED_WORK(&conn->security_timer, security_timeout);
6953 else
6954 INIT_DELAYED_WORK(&conn->info_timer, l2cap_info_timeout);
6955 6939
6956 INIT_WORK(&conn->disconn_work, disconn_work); 6940 INIT_WORK(&conn->disconn_work, disconn_work);
6957 6941