Author: emaste Date: Mon Feb 24 19:48:29 2020 New Revision: 358299 URL: https://svnweb.freebsd.org/changeset/base/358299
Log: muge: fix rxcsum enable test if_capabilities indicates capabilities supported by the hardware; if_capenable which are enabled. Note that rx checksum is still disabled in the driver at compile time. Submitted by: Johannes <iz-rp...@hs-karlsruhe.de> MFC after: 2 weeks Modified: head/sys/dev/usb/net/if_muge.c Modified: head/sys/dev/usb/net/if_muge.c ============================================================================== --- head/sys/dev/usb/net/if_muge.c Mon Feb 24 19:18:50 2020 (r358298) +++ head/sys/dev/usb/net/if_muge.c Mon Feb 24 19:48:29 2020 (r358299) @@ -1262,7 +1262,7 @@ muge_bulk_read_callback(struct usb_xfer *xfer, usb_err * Check if RX checksums are computed, and * offload them */ - if ((ifp->if_capabilities & IFCAP_RXCSUM) && + if ((ifp->if_capenable & IFCAP_RXCSUM) && !(rx_cmd_a & RX_CMD_A_ICSM_)) { struct ether_header *eh; eh = mtod(m, struct ether_header *); @@ -1970,7 +1970,7 @@ static int muge_sethwcsum(struct muge_softc *sc) MUGE_LOCK_ASSERT(sc, MA_OWNED); - if (ifp->if_capabilities & IFCAP_RXCSUM) { + if (ifp->if_capenable & IFCAP_RXCSUM) { sc->sc_rfe_ctl |= ETH_RFE_CTL_IGMP_COE_ | ETH_RFE_CTL_ICMP_COE_; sc->sc_rfe_ctl |= ETH_RFE_CTL_TCPUDP_COE_ | ETH_RFE_CTL_IP_COE_; } else { _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"