Kernel, 2.6.20, ad-hoc bug

Maciek Borzecki <[email protected]> Sun, 25 Mar 2007 11:24:54 +0200
Newsgroups gmane.linux.drivers.at76c503a.user
Message-ID <[email protected]>
--MP_bKg7qflMbcF_Z7zSum.zeWr
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi everyone,

It looks like the CVS sources have problems with data reception. 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

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.

Maciek

--MP_bKg7qflMbcF_Z7zSum.zeWr
Content-Type: text/x-patch; name=at76.patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=at76.patch

--- at76c503.c.orig	2007-02-27 19:06:03.000000000 +0100
+++ at76c503.c	2007-03-25 10:55:02.000000000 +0200
@@ -3968,7 +3968,8 @@ static struct sk_buff *check_for_rx_frag
 
 	/* length including the IEEE802.11 header, excl. the trailing FCS,
 	   excl. the struct at76c503_rx_buffer */
-	int length = le16_to_cpu(buf->wlength) - dev->rx_data_fcs_len;
+	//int length = le16_to_cpu(buf->wlength) - dev->rx_data_fcs_len;
+	int length = le16_to_cpu(buf->wlength);
 	
 	/* where does the data payload start in skb->data ? */
 	u8 *data = (u8 *)i802_11_hdr + sizeof(struct ieee80211_hdr_3addr);
@@ -4023,7 +4024,7 @@ static struct sk_buff *check_for_rx_frag
 	assert(length  > AT76C503_RX_HDRLEN);
 	skb_pull(skb, AT76C503_RX_HDRLEN);
 	/* remove FCS at end */
-	skb_trim(skb, length);
+	//skb_trim(skb, length);
 
 	dbg(DBG_RX_FRAGS_SKB, "%s: trimmed skb: head %p data %p tail %p "
 	    "end %p len %d data %p data_len %d",

--MP_bKg7qflMbcF_Z7zSum.zeWr
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
at76c503a-user mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/at76c503a-user

--MP_bKg7qflMbcF_Z7zSum.zeWr--