Commit b7e773b8 authored by G. Liakhovetski's avatar G. Liakhovetski Committed by David S. Miller

[IrDA]: f-timer reloading when sending rejected frames.

Jean II was right: you have to re-charge the final timer when
resending rejected frames. Otherwise it triggers at a wrong time and
can break the currently running communication. Reproducible under
rt-preempt.
Signed-off-by: default avatarG. Liakhovetski <gl@dsa-ac.de>
Signed-off-by: default avatarSamuel Ortiz <samuel@sortiz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c0cfe7fa
...@@ -1418,14 +1418,14 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1418,14 +1418,14 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
*/ */
self->remote_busy = FALSE; self->remote_busy = FALSE;
/* Stop final timer */
del_timer(&self->final_timer);
/* /*
* Nr as expected? * Nr as expected?
*/ */
ret = irlap_validate_nr_received(self, info->nr); ret = irlap_validate_nr_received(self, info->nr);
if (ret == NR_EXPECTED) { if (ret == NR_EXPECTED) {
/* Stop final timer */
del_timer(&self->final_timer);
/* Update Nr received */ /* Update Nr received */
irlap_update_nr_received(self, info->nr); irlap_update_nr_received(self, info->nr);
...@@ -1457,14 +1457,12 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1457,14 +1457,12 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
/* Resend rejected frames */ /* Resend rejected frames */
irlap_resend_rejected_frames(self, CMD_FRAME); irlap_resend_rejected_frames(self, CMD_FRAME);
irlap_start_final_timer(self, self->final_timeout * 2);
/* Final timer ??? Jean II */
irlap_next_state(self, LAP_NRM_P); irlap_next_state(self, LAP_NRM_P);
} else if (ret == NR_INVALID) { } else if (ret == NR_INVALID) {
IRDA_DEBUG(1, "%s(), Received RR with " IRDA_DEBUG(1, "%s(), Received RR with "
"invalid nr !\n", __FUNCTION__); "invalid nr !\n", __FUNCTION__);
del_timer(&self->final_timer);
irlap_next_state(self, LAP_RESET_WAIT); irlap_next_state(self, LAP_RESET_WAIT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment