From d9e645fea53cf4d468f992233ea3f858addb0ebe Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 28 May 2009 23:26:33 -0700 Subject: [PATCH] --- yaml --- r: 150542 b: refs/heads/master c: 528be7ff823c3d0fc08c91f31b1e84c5f2681762 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/irda/irlap_frame.c | 18 ++---------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/[refs] b/[refs] index e6333fdb368f..b9658e15f705 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 915219441d566f1da0caa0e262be49b666159e17 +refs/heads/master: 528be7ff823c3d0fc08c91f31b1e84c5f2681762 diff --git a/trunk/net/irda/irlap_frame.c b/trunk/net/irda/irlap_frame.c index 2562ebc1b22c..7af2e74deda8 100644 --- a/trunk/net/irda/irlap_frame.c +++ b/trunk/net/irda/irlap_frame.c @@ -982,17 +982,12 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command) { struct sk_buff *tx_skb; struct sk_buff *skb; - int count; IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;); - /* Initialize variables */ - count = skb_queue_len(&self->wx_list); - /* Resend unacknowledged frame(s) */ - skb = skb_peek(&self->wx_list); - while (skb != NULL) { + skb_queue_walk(&self->wx_list, skb) { irlap_wait_min_turn_around(self, &self->qos_tx); /* We copy the skb to be retransmitted since we will have to @@ -1011,21 +1006,12 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command) /* * Set poll bit on the last frame retransmitted */ - if (count-- == 1) + if (skb_queue_is_last(&self->wx_list, skb)) tx_skb->data[1] |= PF_BIT; /* Set p/f bit */ else tx_skb->data[1] &= ~PF_BIT; /* Clear p/f bit */ irlap_send_i_frame(self, tx_skb, command); - - /* - * If our skb is the last buffer in the list, then - * we are finished, if not, move to the next sk-buffer - */ - if (skb == skb_peek_tail(&self->wx_list)) - skb = NULL; - else - skb = skb->next; } #if 0 /* Not yet */ /*