Re: Kernel, 2.6.20, ad-hoc bug

Pavel Roskin <[email protected]> Thu, 12 Apr 2007 23:54:24 -0400
Newsgroups gmane.linux.drivers.at76c503a.user
Message-ID <1176436464.28377.35.camel@dv>
Hello, Maciek!

On Sun, 2007-03-25 at 11:24 +0200, Maciek Borzecki wrote:
> Hi everyone,

Sorry for delay!  I didn't realize you included a patch.

> It looks like the CVS sources have problems with data reception.

The driver is currently developed in git, but I synchronized the CVS
repository with the git repository.

It would be better if you check out the git repository:
git-clone http://honk.sigxcpu.org/git/at76c503a.git

> I have a setup of one PC (192.168.3.1) on 2.6.20 with SMC2662W card
> running with at76c503a driver and laptop (192.168.3.2) with 8180 card on
> ndiswrapper. 
> In ad-hoc mode, pinging from laptop to PC:
> 10:44:03.818567 IP truncated-ip - 4 bytes missing! 192.168.3.2 >
> 192.168.3.1: ICMP echo request, id 38931, seq 1, length 64
> 10:44:04.821334 IP truncated-ip - 4 bytes missing! 192.168.3.2 >
> 192.168.3.1: ICMP echo request, id 38931, seq 2, length 64

I cannot reproduce this problem with current hostap (prism 2.5, Intersil
firmware 1.7.4) on one size and current at76_usb on the other (Netgear
MA101, firmware at76c503-rfmd 1.101.2 #84).

> pinging from PC to laptop revealed that IP packets were correcly
> received on laptop, but echo response was again truncated on PC.
> I have deleted trimming of FCS as shown in the patch and data started
> to flow, tcpdump does not report truncated packets anymore.
> You may want to take a look and see if the real issue is fixed.

I see that you commented out skb_trim() in the code that only affects
fragmented frames.  I don't think it would affect ping because I see
that you are using short packets.

The other part of the patch is equivalent to redefining rx_data_fcs_len
to be 0 instead of 4.  A comment in the code says:

/* fw 0.84 doesn't send FCS with rx data */

Perhaps you have another firmware that doesn't send FCS, or maybe your
firmware is configured not to send it.

Please check the kernel log for a message containing "fcs_len":

dmesg |grep fcs_len

It should also contain the firmware version.  That may be helpful.

-- 
Regards,
Pavel Roskin