Hi,

This diffs discards frame largers than 2500 bytes.

Tested on my machine:

urtw0 at uhub0 port 2 "Realtek RTL8187B" rev 2.00/2.00 addr 2
urtw0: RTL8187B rev E, address 00:16:44:9f:76:cb
urtw0 at uhub0 port 2 "Realtek RTL8187B" rev 2.00/2.00 addr 2
urtw0: RTL8187B rev E, address 00:16:44:9f:76:cb

I tested with both normal traffic,NFS, and scp.

Name    Mtu   Network     Address              Ipkts Ierrs    Opkts Oerrs Colls
urtw0   1500  <Link>      00:16:44:9f:76:cb    22989   129    15563     0     0
urtw0   1500  fe80::%urtw fe80::216:44ff:fe    22989   129    15563     0     0
urtw0   1500  192.168.0/2 192.168.0.9          22989   129    15563     0     0

No regressions here.

I'd really appreciate feedback on this, since I'm not familiar
with the wifi stack. Any Wifi guru around :-) ?

Index: src/sys/dev/usb/if_urtw.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_urtw.c,v
retrieving revision 1.38
diff -u -p -r1.38 if_urtw.c
--- src/sys/dev/usb/if_urtw.c   25 Jan 2011 20:03:35 -0000      1.38
+++ src/sys/dev/usb/if_urtw.c   20 Mar 2011 06:17:35 -0000
@@ -3141,7 +3141,7 @@ urtw_rxeof(usbd_xfer_handle xfer, usbd_p
        }
 
        usbd_get_xfer_status(xfer, NULL, NULL, &actlen, NULL);
-       if (actlen < URTW_MIN_RXBUFSZ) {
+       if (actlen < URTW_MIN_RXBUFSZ || actlen > URTW_RX_MAXSIZE) {
                ifp->if_ierrors++;
                goto skip;
        }


Please test this on as many urtw(4) devices as you can.

//Logan
C-x-C-c

Reply via email to