mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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:
parent
7ae9dd7d4c
commit
178a82f936
1 changed files with 0 additions and 16 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue