Bluetooth: Add L2CAP Disconnect suppport for LE
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 15 May 2013 07:16:06 +0000 (10:16 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 5 Dec 2013 15:05:33 +0000 (07:05 -0800)
The normal L2CAP Disconnect request and response are also used for LE
connection oriented channels. Therefore, we can simply use the existing
handler functions for terminating LE based L2CAP channels.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap_core.c

index 744afae619314c57913fdb09bfff35cc2ff20353..8775d43bf05984976cb773a7a40155faee0ce59d 100644 (file)
@@ -5554,6 +5554,13 @@ static inline int l2cap_le_sig_cmd(struct l2cap_conn *conn,
        case L2CAP_LE_CONN_REQ:
                return l2cap_le_connect_req(conn, cmd, cmd_len, data);
 
+       case L2CAP_DISCONN_REQ:
+               return l2cap_disconnect_req(conn, cmd, cmd_len, data);
+
+       case L2CAP_DISCONN_RSP:
+               l2cap_disconnect_rsp(conn, cmd, cmd_len, data);
+               return 0;
+
        default:
                BT_ERR("Unknown LE signaling command 0x%2.2x", cmd->code);
                return -EINVAL;