From: Mat Martineau Date: Tue, 23 Oct 2012 22:24:22 +0000 (-0700) Subject: Bluetooth: Do not retransmit data during a channel move X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e6a3ee6e8aa27d0a38be7ead0c1624041697ffbc;p=openwrt%2Fstaging%2Fblogic.git Bluetooth: Do not retransmit data during a channel move Do not retransmit previously-sent data when a "receiver ready" s-frame with the "final" flag is received during a move. The ERTM state machines will resynchronize at the end of a channel move, and the state machine needs to avoid state changes during a move. Signed-off-by: Mat Martineau Acked-by: Marcel Holtmann Acked-by: Andrei Emeltchenko Signed-off-by: Gustavo Padovan --- diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index ef86ebb92a00..93f1ebbd7502 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -5591,8 +5591,8 @@ static int l2cap_rx_state_recv(struct l2cap_chan *chan, if (control->final) { clear_bit(CONN_REMOTE_BUSY, &chan->conn_state); - if (!test_and_clear_bit(CONN_REJ_ACT, - &chan->conn_state)) { + if (!test_and_clear_bit(CONN_REJ_ACT, &chan->conn_state) && + !__chan_is_moving(chan)) { control->final = 0; l2cap_retransmit_all(chan, control); }