Search Linux Wireless

Re: [RFC]: atk5k: fix FCS corruption for ACKs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux