]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Bluetooth: Update buffer_seq before retransmit frames
authorGustavo F. Padovan <padovan@profusion.mobi>
Wed, 16 Jun 2010 20:21:44 +0000 (17:21 -0300)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 21 Jul 2010 17:39:06 +0000 (10:39 -0700)
Updating buffer_seq first make us able to ack the last I-frame received.
This is also a requirement of the  Profile Tuning Suite software.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap.c

index 40cf67c11d2026fedd71ed79fd26efcb6ce7b543..ecf3e3dcefe312134f71f2c111f46e4399751c69 100644 (file)
@@ -3931,6 +3931,10 @@ expected:
                return 0;
        }
 
+       err = l2cap_push_rx_skb(sk, skb, rx_control);
+       if (err < 0)
+               return 0;
+
        if (rx_control & L2CAP_CTRL_FINAL) {
                if (pi->conn_state & L2CAP_CONN_REJ_ACT)
                        pi->conn_state &= ~L2CAP_CONN_REJ_ACT;
@@ -3938,10 +3942,6 @@ expected:
                        l2cap_retransmit_frames(sk);
        }
 
-       err = l2cap_push_rx_skb(sk, skb, rx_control);
-       if (err < 0)
-               return 0;
-
        __mod_ack_timer();
 
        pi->num_acked = (pi->num_acked + 1) % num_to_ack;