aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2013-05-14 15:46:01 -0400
committerMarcel Holtmann <marcel@holtmann.org>2013-12-05 10:05:33 -0500
commitcea04ce35eb3e2e53e7c7bb8ebe9c10312f79b84 (patch)
treeba525be0868bb825e829524d219dcdf4027a1a60 /net/bluetooth
parent27e2d4c8d28be1d1b4ecfbffab572d7dbd35254d (diff)
Bluetooth: Fix L2CAP channel closing for LE connections
Sending of the L2CAP Disconnect request should also be performed for LE based channels. The proper thing to do is therefore to look at whether there's a PSM specified for the channel instead of looking at the link type. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/l2cap_core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index d6f518d7e61b..744afae61931 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -674,8 +674,10 @@ void l2cap_chan_close(struct l2cap_chan *chan, int reason)
674 674
675 case BT_CONNECTED: 675 case BT_CONNECTED:
676 case BT_CONFIG: 676 case BT_CONFIG:
677 if (chan->chan_type == L2CAP_CHAN_CONN_ORIENTED && 677 /* ATT uses L2CAP_CHAN_CONN_ORIENTED so we must also
678 conn->hcon->type == ACL_LINK) { 678 * check for chan->psm.
679 */
680 if (chan->chan_type == L2CAP_CHAN_CONN_ORIENTED && chan->psm) {
679 __set_chan_timer(chan, chan->ops->get_sndtimeo(chan)); 681 __set_chan_timer(chan, chan->ops->get_sndtimeo(chan));
680 l2cap_send_disconn_req(chan, reason); 682 l2cap_send_disconn_req(chan, reason);
681 } else 683 } else