* [PATCH] rt2x00: Fix trimming of L2 padded frames.
@ 2009-12-04 21:36 Gertjan van Wingerde
2009-12-05 8:32 ` Ivo van Doorn
0 siblings, 1 reply; 2+ messages in thread
From: Gertjan van Wingerde @ 2009-12-04 21:36 UTC (permalink / raw)
To: users, linux-wireless
Cc: Ivo van Doorn, Benoit Papillault, Gertjan van Wingerde
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>
---
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
--
1.6.5.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rt2x00: Fix trimming of L2 padded frames.
2009-12-04 21:36 [PATCH] rt2x00: Fix trimming of L2 padded frames Gertjan van Wingerde
@ 2009-12-05 8:32 ` Ivo van Doorn
0 siblings, 0 replies; 2+ messages in thread
From: Ivo van Doorn @ 2009-12-05 8:32 UTC (permalink / raw)
To: Gertjan van Wingerde
Cc: users, linux-wireless, Benoit Papillault, John Linville
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-05 8:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).