Skip to content

Commit

Permalink
Bluetooth: AMP: Drop packets when no l2cap conn exist
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrei Emeltchenko authored and Gustavo Padovan committed Oct 15, 2012
1 parent d73a098 commit 1d13a25
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1d13a25

Please sign in to comment.