From: Ruiyi Zhang <Ruiyi.zhang@atheros.com>
Date: Mon, 18 Apr 2011 03:04:30 +0000 (+0800)
Subject: Bluetooth: Only keeping SAR bits when retransmitting one frame.
X-Git-Tag: v2.6.39-rc6~7^2~24^2~3^2
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a429b51930e64dd355840c37251a563000d7c10b;p=users%2Fjedix%2Flinux-maple.git

Bluetooth: Only keeping SAR bits when retransmitting one frame.

When retrasmitting one frame, only SAR bits in control field should
be kept.

Signed-off-by: Ruiyi Zhang <Ruiyi.zhang@atheros.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
---

diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index ca27f3a41536..2c8dd4494c63 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1051,6 +1051,7 @@ static void l2cap_retransmit_one_frame(struct sock *sk, u8 tx_seq)
 	tx_skb = skb_clone(skb, GFP_ATOMIC);
 	bt_cb(skb)->retries++;
 	control = get_unaligned_le16(tx_skb->data + L2CAP_HDR_SIZE);
+	control &= L2CAP_CTRL_SAR;
 
 	if (pi->conn_state & L2CAP_CONN_SEND_FBIT) {
 		control |= L2CAP_CTRL_FINAL;