From: Vinicius Costa Gomes Date: Fri, 6 May 2011 21:41:44 +0000 (-0300) Subject: Bluetooth: Add support for disconnecting LE links via mgmt X-Git-Tag: v3.0~349^2~16^2~94^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=365227e5fdf3d117e096416d9d3cc148959a829e;p=platform%2Fkernel%2Flinux-amlogic.git Bluetooth: Add support for disconnecting LE links via mgmt If we can't find a ACL link between the devices, we search the connection list one second time looking for LE links. Signed-off-by: Vinicius Costa Gomes Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 2481d25..dae382c 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1033,6 +1033,9 @@ static int disconnect(struct sock *sk, u16 index, unsigned char *data, u16 len) } conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->bdaddr); + if (!conn) + conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &cp->bdaddr); + if (!conn) { err = cmd_status(sk, index, MGMT_OP_DISCONNECT, ENOTCONN); goto failed;