From 7400e7f5ecba080ddb2403b48105651857a08bc6 Mon Sep 17 00:00:00 2001 From: Peter Krystad Date: Mon, 12 Sep 2011 16:31:22 -0700 Subject: [PATCH] Revert "Bluetooth: check L2CAP length in first ACL fragment" This reverts commit 8979481328dc2e14cea9f99b3562ffcf8655998e CRs-fixed: 305959 Signed-off-by: Peter Krystad --- net/bluetooth/l2cap_core.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 3c428fdd60e..2149ebe50f4 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -7350,8 +7350,6 @@ static int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 fl if (flags & ACL_START) { struct l2cap_hdr *hdr; - struct sock *sk; - u16 cid; int len; if (conn->rx_len) { @@ -7371,7 +7369,6 @@ static int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 fl hdr = (struct l2cap_hdr *) skb->data; len = __le16_to_cpu(hdr->len) + L2CAP_HDR_SIZE; - cid = __le16_to_cpu(hdr->cid); if (len == skb->len) { /* Complete frame received */ @@ -7396,19 +7393,6 @@ static int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 fl goto drop; } - sk = l2cap_get_chan_by_scid(&conn->chan_list, cid); - - if (sk && l2cap_pi(sk)->imtu < len - L2CAP_HDR_SIZE) { - BT_ERR("Frame exceeding recv MTU (len %d, MTU %d)", - len, l2cap_pi(sk)->imtu); - bh_unlock_sock(sk); - l2cap_conn_unreliable(conn, ECOMM); - goto drop; - } - - if (sk) - bh_unlock_sock(sk); - /* Allocate skb for the complete frame (with header) */ conn->rx_skb = bt_skb_alloc(len, GFP_ATOMIC); if (!conn->rx_skb)