All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: users@rt2x00.serialmonkey.com, linux-wireless@vger.kernel.org,
	Benoit Papillault <benoit.papillault@free.fr>,
	John Linville <linville@tuxdriver.com>
Subject: Re: [PATCH] rt2x00: Fix trimming of L2 padded frames.
Date: Sat, 5 Dec 2009 09:32:27 +0100	[thread overview]
Message-ID: <200912050932.27897.IvDoorn@gmail.com> (raw)
In-Reply-To: <1259962577-25135-1-git-send-email-gwingerde@gmail.com>

On Friday 04 December 2009, Gertjan van Wingerde wrote:
> Ensure that frames without payload are properly trimmed in
> rt2x00queue_insert_l2pad.
> 
> This should fix the bug reported by Benoit Papillault in:
> http://marc.info/?l=linux-wireless&m=125974773006734&w=2
> 
> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>

Acked-by: Ivo van Doorn <IvDoorn@gmail.com>

> ---
>  drivers/net/wireless/rt2x00/rt2x00queue.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
> index 7452fa8..3d8fb68 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00queue.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
> @@ -180,7 +180,7 @@ void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length)
>  	unsigned int payload_length = skb->len - header_length;
>  	unsigned int header_align = ALIGN_SIZE(skb, 0);
>  	unsigned int payload_align = ALIGN_SIZE(skb, header_length);
> -	unsigned int l2pad = L2PAD_SIZE(header_length);
> +	unsigned int l2pad = payload_length ? L2PAD_SIZE(header_length) : 0;
>  
>  	/*
>  	 * Adjust the header alignment if the payload needs to be moved more



      reply	other threads:[~2009-12-05  8:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04 21:36 [PATCH] rt2x00: Fix trimming of L2 padded frames Gertjan van Wingerde
2009-12-05  8:32 ` Ivo van Doorn [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=200912050932.27897.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=benoit.papillault@free.fr \
    --cc=gwingerde@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=users@rt2x00.serialmonkey.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.