When RX checksum offloading is active, AX88772B will prepend a

checksum header.  The header contains a received frame length but
the defined length for AX88772B is different with other ASIX
controllers.  When the RX checksum is off, AX88772B controller does
not prepend a checksum header so driver has to use normal header
length mask.
This change should fix RX errors when RX checksum offloading is
off.

Tested by:	kevlo
MFC After:	1 week
This commit is contained in:
yongari 2013-06-24 05:18:31 +00:00
parent 2478a430f6
commit 25ae538b0d

View File

@ -1351,15 +1351,14 @@ axe_init(struct usb_ether *ue)
if (AXE_IS_178_FAMILY(sc)) {
sc->sc_flags &= ~(AXE_FLAG_STD_FRAME | AXE_FLAG_CSUM_FRAME);
if ((sc->sc_flags & AXE_FLAG_772B) != 0)
sc->sc_lenmask = AXE_CSUM_HDR_LEN_MASK;
else
sc->sc_lenmask = AXE_HDR_LEN_MASK;
if ((sc->sc_flags & AXE_FLAG_772B) != 0 &&
(ifp->if_capenable & IFCAP_RXCSUM) != 0)
(ifp->if_capenable & IFCAP_RXCSUM) != 0) {
sc->sc_lenmask = AXE_CSUM_HDR_LEN_MASK;
sc->sc_flags |= AXE_FLAG_CSUM_FRAME;
else
} else {
sc->sc_lenmask = AXE_HDR_LEN_MASK;
sc->sc_flags |= AXE_FLAG_STD_FRAME;
}
}
/* Configure TX/RX checksum offloading. */