Revert "Bluetooth: check L2CAP length in first ACL fragment"

This reverts commit 8979481328

CRs-fixed: 305959
Change-Id: I897ba350fc9106f32265ba8cabb846494fb36f69
Signed-off-by: Peter Krystad <pkrystad@codeaurora.org>
This commit is contained in:
Peter Krystad 2011-09-12 16:31:22 -07:00 committed by Stephen Boyd
parent 7ae9dd7d4c
commit 178a82f936

View file

@ -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)