Commit 1f51b62a authored by Jean Tourrilhes's avatar Jean Tourrilhes Committed by Linus Torvalds

[PATCH] IrLAP retry count

ir260_lap_retry_count.diff :
~~~~~~~~~~~~~~~~~~~~~~~~~~
	o [CORRECT] add interoperability workaround for 2.4.X IrDA stacks
parent 0b682e85
...@@ -1215,35 +1215,31 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1215,35 +1215,31 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
* Check for expected I(nformation) frame * Check for expected I(nformation) frame
*/ */
if ((ns_status == NS_EXPECTED) && (nr_status == NR_EXPECTED)) { if ((ns_status == NS_EXPECTED) && (nr_status == NR_EXPECTED)) {
/* poll bit cleared? */
if (!info->pf) {
self->vr = (self->vr + 1) % 8;
/* Update Nr received */
irlap_update_nr_received( self, info->nr);
self->ack_required = TRUE;
/* Keep state, do not move this line */
irlap_next_state(self, LAP_NRM_P);
irlap_data_indication(self, skb, FALSE);
} else {
del_timer(&self->final_timer);
/* Update Vr (next frame for us to receive) */
self->vr = (self->vr + 1) % 8; self->vr = (self->vr + 1) % 8;
/* Update Nr received */ /* Update Nr received, cleanup our retry queue */
irlap_update_nr_received(self, info->nr); irlap_update_nr_received(self, info->nr);
/* /*
* Got expected NR, so reset the * Got expected NR, so reset the
* retry_count. This is not done by IrLAP, * retry_count. This is not done by IrLAP spec,
* which is strange! * which is strange!
*/ */
self->retry_count = 0; self->retry_count = 0;
self->ack_required = TRUE; self->ack_required = TRUE;
/* poll bit cleared? */
if (!info->pf) {
/* Keep state, do not move this line */
irlap_next_state(self, LAP_NRM_P);
irlap_data_indication(self, skb, FALSE);
} else {
/* No longer waiting for pf */
del_timer(&self->final_timer);
irlap_wait_min_turn_around(self, &self->qos_tx); irlap_wait_min_turn_around(self, &self->qos_tx);
/* Call higher layer *before* changing state /* Call higher layer *before* changing state
...@@ -1869,15 +1865,18 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1869,15 +1865,18 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
* Check for expected I(nformation) frame * Check for expected I(nformation) frame
*/ */
if ((ns_status == NS_EXPECTED) && (nr_status == NR_EXPECTED)) { if ((ns_status == NS_EXPECTED) && (nr_status == NR_EXPECTED)) {
/*
* poll bit cleared? /* Update Vr (next frame for us to receive) */
*/
if (!info->pf) {
self->vr = (self->vr + 1) % 8; self->vr = (self->vr + 1) % 8;
/* Update Nr received */ /* Update Nr received */
irlap_update_nr_received(self, info->nr); irlap_update_nr_received(self, info->nr);
/*
* poll bit cleared?
*/
if (!info->pf) {
self->ack_required = TRUE; self->ack_required = TRUE;
/* /*
...@@ -1893,11 +1892,6 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1893,11 +1892,6 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
irlap_data_indication(self, skb, FALSE); irlap_data_indication(self, skb, FALSE);
break; break;
} else { } else {
self->vr = (self->vr + 1) % 8;
/* Update Nr received */
irlap_update_nr_received(self, info->nr);
/* /*
* We should wait before sending RR, and * We should wait before sending RR, and
* also before changing to XMIT_S * also before changing to XMIT_S
......
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