lkml.org 
[lkml]   [2003]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 2.5 IrDA] IrLAP retry count
From
ir260_lap_retry_count.diff :
~~~~~~~~~~~~~~~~~~~~~~~~~~
o [CORRECT] add interoperability workaround for 2.4.X IrDA stacks


diff -u -p linux/net/irda/irlap_event.d2.c linux/net/irda/irlap_event.c
--- linux/net/irda/irlap_event.d2.c Fri Jul 18 11:08:41 2003
+++ linux/net/irda/irlap_event.c Fri Jul 18 11:30:47 2003
@@ -1215,35 +1215,31 @@ static int irlap_state_nrm_p(struct irla
* Check for expected I(nformation) frame
*/
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);
+ /* Update Vr (next frame for us to receive) */
+ self->vr = (self->vr + 1) % 8;

- self->ack_required = TRUE;
+ /* Update Nr received, cleanup our retry queue */
+ irlap_update_nr_received(self, info->nr);
+
+ /*
+ * Got expected NR, so reset the
+ * retry_count. This is not done by IrLAP spec,
+ * which is strange!
+ */
+ self->retry_count = 0;
+ 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);

- self->vr = (self->vr + 1) % 8;
-
- /* Update Nr received */
- irlap_update_nr_received(self, info->nr);
-
- /*
- * Got expected NR, so reset the
- * retry_count. This is not done by IrLAP,
- * which is strange!
- */
- self->retry_count = 0;
- self->ack_required = TRUE;
-
irlap_wait_min_turn_around(self, &self->qos_tx);

/* Call higher layer *before* changing state
@@ -1869,14 +1865,17 @@ static int irlap_state_nrm_s(struct irla
* Check for expected I(nformation) frame
*/
if ((ns_status == NS_EXPECTED) && (nr_status == NR_EXPECTED)) {
+
+ /* Update Vr (next frame for us to receive) */
+ self->vr = (self->vr + 1) % 8;
+
+ /* Update Nr received */
+ irlap_update_nr_received(self, info->nr);
+
/*
* 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;

@@ -1893,11 +1892,6 @@ static int irlap_state_nrm_s(struct irla
irlap_data_indication(self, skb, FALSE);
break;
} else {
- self->vr = (self->vr + 1) % 8;
-
- /* Update Nr received */
- irlap_update_nr_received(self, info->nr);
-
/*
* We should wait before sending RR, and
* also before changing to XMIT_S
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.044 / U:5.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site