aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap.c
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2010-05-01 15:15:43 -0400
committerMarcel Holtmann <marcel@holtmann.org>2010-05-10 03:28:51 -0400
commitafefdbc4cf3b9d409d07e1e5264e7ff88bc48711 (patch)
treee3908d245e64c0b242da0e9dbec8cd278338f13c /net/bluetooth/l2cap.c
parent0041ecfa3025d7612fdaab12b2f07c9c3c09f42f (diff)
Bluetooth: Fix SDU reassembly under SREJ
The code was reusing the control var without its reinitialization. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Reviewed-by: João Paulo Rechi Vita <jprvita@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r--net/bluetooth/l2cap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index bf5bb7dc6abf..478def700c7c 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -3446,14 +3446,14 @@ drop:
3446static void l2cap_check_srej_gap(struct sock *sk, u8 tx_seq) 3446static void l2cap_check_srej_gap(struct sock *sk, u8 tx_seq)
3447{ 3447{
3448 struct sk_buff *skb; 3448 struct sk_buff *skb;
3449 u16 control = 0; 3449 u16 control;
3450 3450
3451 while((skb = skb_peek(SREJ_QUEUE(sk)))) { 3451 while((skb = skb_peek(SREJ_QUEUE(sk)))) {
3452 if (bt_cb(skb)->tx_seq != tx_seq) 3452 if (bt_cb(skb)->tx_seq != tx_seq)
3453 break; 3453 break;
3454 3454
3455 skb = skb_dequeue(SREJ_QUEUE(sk)); 3455 skb = skb_dequeue(SREJ_QUEUE(sk));
3456 control |= bt_cb(skb)->sar << L2CAP_CTRL_SAR_SHIFT; 3456 control = bt_cb(skb)->sar << L2CAP_CTRL_SAR_SHIFT;
3457 l2cap_sar_reassembly_sdu(sk, skb, control); 3457 l2cap_sar_reassembly_sdu(sk, skb, control);
3458 l2cap_pi(sk)->buffer_seq_srej = 3458 l2cap_pi(sk)->buffer_seq_srej =
3459 (l2cap_pi(sk)->buffer_seq_srej + 1) % 64; 3459 (l2cap_pi(sk)->buffer_seq_srej + 1) % 64;