Bluetooth: Add Recv RR (P=0)(F=0) for SREJ_SENT state on ERTM
authorGustavo F. Padovan <padovan@profusion.mobi>
Sat, 1 May 2010 19:15:38 +0000 (16:15 -0300)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 10 May 2010 07:28:47 +0000 (09:28 +0200)
This finishes the implementation of Recv RR (P=0)(F=0) for the Enhanced
Retransmission Mode on L2CAP.

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>
net/bluetooth/l2cap.c

index 852c1400d069f923ebe6cda5f6ac7a1a6b1182d1..e5cd64ac6fb2a8491be232edf11421aa84c25754 100644 (file)
@@ -3517,7 +3517,10 @@ static inline int l2cap_data_channel_sframe(struct sock *sk, u16 rx_control, str
                                __mod_retrans_timer();
 
                        pi->conn_state &= ~L2CAP_CONN_REMOTE_BUSY;
-                       l2cap_ertm_send(sk);
+                       if (pi->conn_state & L2CAP_CONN_SREJ_SENT)
+                               l2cap_send_ack(pi);
+                       else
+                               l2cap_ertm_send(sk);
                }
                break;