Bluetooth: AMP: Drop packets when no l2cap conn exist
authorAndrei Emeltchenko <[email protected]>
Mon, 15 Oct 2012 08:58:41 +0000 (11:58 +0300)
committerGustavo Padovan <[email protected]>
Mon, 15 Oct 2012 12:47:11 +0000 (09:47 -0300)
High Speed hci_conn should always have l2cap_conn associated with it.

Signed-off-by: Andrei Emeltchenko <[email protected]>
Acked-by: Marcel Holtmann <[email protected]>
Signed-off-by: Gustavo Padovan <[email protected]>
net/bluetooth/l2cap_core.c

index 8faa3121bb44a7c2d54bf9785582b05f8fa9edb8..99176730bf2cb3c1c8e7b402c49e809a41837893 100644 (file)
@@ -5571,6 +5571,10 @@ int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags)
        struct l2cap_hdr *hdr;
        int len;
 
+       /* For AMP controller do not create l2cap conn */
+       if (!conn && hcon->hdev->dev_type != HCI_BREDR)
+               goto drop;
+
        if (!conn)
                conn = l2cap_conn_add(hcon, 0);