Bluetooth: Don't forget to check for LE_LINK
authorGustavo F. Padovan <padovan@profusion.mobi>
Wed, 8 Jun 2011 22:09:13 +0000 (19:09 -0300)
committerGustavo F. Padovan <padovan@profusion.mobi>
Mon, 13 Jun 2011 18:11:54 +0000 (15:11 -0300)
Otherwise the wrong error can be returned.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/l2cap_core.c

index 3b31a1f..cb68b27 100644 (file)
@@ -4127,7 +4127,7 @@ static int l2cap_disconn_ind(struct hci_conn *hcon)
 
        BT_DBG("hcon %p", hcon);
 
-       if (hcon->type != ACL_LINK || !conn)
+       if ((hcon->type != ACL_LINK && hcon->type != LE_LINK) || !conn)
                return 0x13;
 
        return conn->disc_reason;