diff options
author | Robie Basak <rb-oss-1@justgohome.co.uk> | 2008-01-19 02:56:54 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:08:08 -0500 |
commit | 6d97b53e92af822890b87818c99820df47fc589b (patch) | |
tree | 2f5919891764d7c8992c44030ab303ae423af3f1 | |
parent | 775516bfa2bd7993620c9039191a0c30b8d8a496 (diff) |
[IrDA]: Resend frames on timeout.
When final timer expires, it might also mean that the i:cmd wasn't
received properly. If we have rejected frames, we can try to resend them.
Signed-off-by: Robie Basak <rb-oss-1@justgohome.co.uk>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/irda/irlap_event.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c index 4c33bf5c835..6d3aff862dc 100644 --- a/net/irda/irlap_event.c +++ b/net/irda/irlap_event.c | |||
@@ -1514,9 +1514,15 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1514 | 1514 | ||
1515 | /* N2 is the disconnect timer. Until we reach it, we retry */ | 1515 | /* N2 is the disconnect timer. Until we reach it, we retry */ |
1516 | if (self->retry_count < self->N2) { | 1516 | if (self->retry_count < self->N2) { |
1517 | /* Retry sending the pf bit to the secondary */ | 1517 | if (skb_peek(&self->wx_list) == NULL) { |
1518 | irlap_wait_min_turn_around(self, &self->qos_tx); | 1518 | /* Retry sending the pf bit to the secondary */ |
1519 | irlap_send_rr_frame(self, CMD_FRAME); | 1519 | IRDA_DEBUG(4, "nrm_p: resending rr"); |
1520 | irlap_wait_min_turn_around(self, &self->qos_tx); | ||
1521 | irlap_send_rr_frame(self, CMD_FRAME); | ||
1522 | } else { | ||
1523 | IRDA_DEBUG(4, "nrm_p: resend frames"); | ||
1524 | irlap_resend_rejected_frames(self, CMD_FRAME); | ||
1525 | } | ||
1520 | 1526 | ||
1521 | irlap_start_final_timer(self, self->final_timeout); | 1527 | irlap_start_final_timer(self, self->final_timeout); |
1522 | self->retry_count++; | 1528 | self->retry_count++; |