linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bob Copeland <me@bobcopeland.com>
To: Patrick McHardy <kaber@trash.net>
Cc: linux-wireless@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>,
	mickflemm@gmail.com, mcgrof@gmail.com
Subject: Re: [RFC]: atk5k: fix FCS corruption for ACKs
Date: Wed, 10 Dec 2008 08:24:40 -0500	[thread overview]
Message-ID: <20081210132440.GA12873@hash.localnet> (raw)
In-Reply-To: <493F4DC5.9090801@trash.net>

On Wed, Dec 10, 2008 at 06:04:05AM +0100, Patrick McHardy wrote:
> This might not be fully correct or not handle other cases where
> this can occur, but it doesn't seem too hackish and fixes the
> problem for me :)

> -		if (hdrlen & 3) {
> +		if (hdrlen & 3 && hdrlen != rs.rs_datalen - FCS_LEN) {
>  			pad = hdrlen % 4;
>  			memmove(skb->data + pad, skb->data, hdrlen);
>  			skb_pull(skb, pad);

It seems very plausible to me.  Though, why doesn't ath9k also have this
problem?  Luis, it looks like in that case ath9k could trim two extra
bytes if ath9k hw behaves the same.

main.c:

   951          /* see if any padding is done by the hw and remove it */
   952          if (hdrlen & 3) {
   953                  padsize = hdrlen % 4;
   954                  memmove(skb->data + padsize, skb->data, hdrlen);
   955                  skb_pull(skb, padsize);
   956          }

   957          /* remove FCS before passing up to protocol stack */
   958          skb_trim(skb, (skb->len - FCS_LEN));

-- 
Bob Copeland %% www.bobcopeland.com


  reply	other threads:[~2008-12-10 13:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-10  5:04 [RFC]: atk5k: fix FCS corruption for ACKs Patrick McHardy
2008-12-10 13:24 ` Bob Copeland [this message]
2008-12-10 13:36   ` Johannes Berg
2008-12-10 13:43   ` Sujith
2008-12-10 14:48     ` Bob Copeland
2008-12-11 19:59   ` Bob Copeland

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=20081210132440.GA12873@hash.localnet \
    --to=me@bobcopeland.com \
    --cc=jirislaby@gmail.com \
    --cc=kaber@trash.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mcgrof@gmail.com \
    --cc=mickflemm@gmail.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 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).