diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-10-10 10:38:31 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-10-11 02:34:46 -0400 |
commit | 716e4ab5c966327988e21e6137c14e457cfca690 (patch) | |
tree | ab7ac56bb440f05fbe44defe452ac256ca4d4e85 /include | |
parent | bd1eb66ba4eee21de3be24212b135f57101ad930 (diff) |
Bluetooth: AMP: Hanlde AMP_LINK case in conn_put
Handle AMP link when setting up disconnect timeout.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index d5ed054d77cf..9fe8e2dec870 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -605,7 +605,10 @@ static inline void hci_conn_put(struct hci_conn *conn) | |||
605 | 605 | ||
606 | if (atomic_dec_and_test(&conn->refcnt)) { | 606 | if (atomic_dec_and_test(&conn->refcnt)) { |
607 | unsigned long timeo; | 607 | unsigned long timeo; |
608 | if (conn->type == ACL_LINK || conn->type == LE_LINK) { | 608 | |
609 | switch (conn->type) { | ||
610 | case ACL_LINK: | ||
611 | case LE_LINK: | ||
609 | del_timer(&conn->idle_timer); | 612 | del_timer(&conn->idle_timer); |
610 | if (conn->state == BT_CONNECTED) { | 613 | if (conn->state == BT_CONNECTED) { |
611 | timeo = conn->disc_timeout; | 614 | timeo = conn->disc_timeout; |
@@ -614,12 +617,20 @@ static inline void hci_conn_put(struct hci_conn *conn) | |||
614 | } else { | 617 | } else { |
615 | timeo = msecs_to_jiffies(10); | 618 | timeo = msecs_to_jiffies(10); |
616 | } | 619 | } |
617 | } else { | 620 | break; |
621 | |||
622 | case AMP_LINK: | ||
623 | timeo = conn->disc_timeout; | ||
624 | break; | ||
625 | |||
626 | default: | ||
618 | timeo = msecs_to_jiffies(10); | 627 | timeo = msecs_to_jiffies(10); |
628 | break; | ||
619 | } | 629 | } |
630 | |||
620 | cancel_delayed_work(&conn->disc_work); | 631 | cancel_delayed_work(&conn->disc_work); |
621 | queue_delayed_work(conn->hdev->workqueue, | 632 | queue_delayed_work(conn->hdev->workqueue, |
622 | &conn->disc_work, timeo); | 633 | &conn->disc_work, timeo); |
623 | } | 634 | } |
624 | } | 635 | } |
625 | 636 | ||