From: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 9/10]: irda: Use SKB queue and list helpers instead of doing it by-hand.
Date: Fri, 29 May 2009 12:36:20 +0200 [thread overview]
Message-ID: <1243593380.8750.0.camel@sortiz-mobl> (raw)
In-Reply-To: <20090529.014025.223389403.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Fri, 2009-05-29 at 01:40 -0700, David Miller wrote:
> Signed-off-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Acked-by: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
Cheers,
Samuel.
> ---
> net/irda/irlap_frame.c | 18 ++----------------
> 1 files changed, 2 insertions(+), 16 deletions(-)
>
> diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c
> index 2562ebc..7af2e74 100644
> --- a/net/irda/irlap_frame.c
> +++ b/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 */
> /*
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2009-05-29 10:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-29 8:40 [PATCH 9/10]: irda: Use SKB queue and list helpers instead of doing it by-hand David Miller
[not found] ` <20090529.014025.223389403.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2009-05-29 10:36 ` Samuel Ortiz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1243593380.8750.0.camel@sortiz-mobl \
--to=samuel-jcdqhdrhkhmdnm+yrofe0a@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).