From: Helmut Schaa <helmut.schaa@googlemail.com>
To: Julian Calaby <julian.calaby@gmail.com>
Cc: Ismael Luceno <ismael.luceno@gmail.com>,
"linux-wireless" <linux-wireless@vger.kernel.org>,
Ivo Van Doorn <ivdoorn@gmail.com>,
Gertjan van Wingerde <gwingerde@gmail.com>
Subject: Re: [PATCH 1/2] rt2x00: Write the frame *after* padding (rt2800 usb devices)
Date: Mon, 20 Dec 2010 11:30:22 +0100 [thread overview]
Message-ID: <201012201130.22582.helmut.schaa@googlemail.com> (raw)
In-Reply-To: <AANLkTi=0AkWAoNhgMbkjwQb5Byu6SVWmOaNWRYsacfU6@mail.gmail.com>
Am Montag, 20. Dezember 2010 schrieb Julian Calaby:
> On Mon, Dec 20, 2010 at 19:55, Helmut Schaa <helmut.schaa@googlemail.com> wrote:
> > Hi,
> >
> > Am Montag, 20. Dezember 2010 schrieb Ismael Luceno:
> >> Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com>
> >> ---
> >> drivers/net/wireless/rt2x00/rt2800usb.c | 7 ++++---
> >> 1 files changed, 4 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
> >> index 3e0205d..85185de 100644
> >> --- a/drivers/net/wireless/rt2x00/rt2800usb.c
> >> +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
> >> @@ -378,9 +378,10 @@ static void rt2800usb_write_tx_data(struct queue_entry *entry,
> >> * | TXINFO | TXWI | 802.11 header | L2 pad | payload | pad | USB end pad |
> >> * |<------------- tx_pkt_len ------------->|
> >> */
> >> - rt2800_write_tx_data(entry, txdesc);
> >> - padding_len = roundup(entry->skb->len + 4, 4) - entry->skb->len;
> >> - memset(skb_put(entry->skb, padding_len), 0, padding_len);
> >> + padding_len = roundup(entry->skb->len + 4, 4) - entry->skb->len;
> >> + memset(skb_put(entry->skb, padding_len), 0, padding_len);
> >> +
> >> + rt2800_write_tx_data(entry, txdesc);
> >
> > Could you please explain this change in more detail please?
> > Why is it needed? rt2800_write_tx_data only adds the TXWI to the front of the
> > buffer, doing that before or after the padding doesn't make a difference, no?
>
> Semantically it makes more sense this way, why modify a entry before
> writing it - but maybe the issue is that the name of the function
> makes it's function ambiguous, maybe renaming it to something along
> the lines of "rt2800_prepend_TXWI" would make it's purpose clearer.
Correct.
Helmut
prev parent reply other threads:[~2010-12-20 10:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-20 8:31 [PATCH 1/2] rt2x00: Write the frame *after* padding (rt2800 usb devices) Ismael Luceno
2010-12-20 8:31 ` [PATCH 2/2] rt2x00: Fix panic on frame padding for rt2800 usb devices (due to not enough skb tailroom) Ismael Luceno
2010-12-20 11:45 ` Ivo Van Doorn
2010-12-20 8:55 ` [PATCH 1/2] rt2x00: Write the frame *after* padding (rt2800 usb devices) Helmut Schaa
2010-12-20 9:30 ` Julian Calaby
2010-12-20 10:30 ` Helmut Schaa [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=201012201130.22582.helmut.schaa@googlemail.com \
--to=helmut.schaa@googlemail.com \
--cc=gwingerde@gmail.com \
--cc=ismael.luceno@gmail.com \
--cc=ivdoorn@gmail.com \
--cc=julian.calaby@gmail.com \
--cc=linux-wireless@vger.kernel.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 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.