summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-10-15 11:58:41 +0300
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-10-15 09:47:11 -0300
commit1d13a254e14565e6a2d91f7552203406a30d1ee2 (patch)
tree7687d81ccba5989a0fcacad15d54450878885964 /net
parentd73a098804b4d1d254b1caf1d114e5b707dee060 (diff)
Bluetooth: AMP: Drop packets when no l2cap conn exist
High Speed hci_conn should always have l2cap_conn associated with it. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/l2cap_core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 8faa3121bb44..99176730bf2c 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -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);