Date: Mon, 9 Mar 2020 14:13:40 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r358809 - stable/12/sys/dev/usb/net Message-ID: <202003091413.029EDeC2037543@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Mon Mar 9 14:13:40 2020 New Revision: 358809 URL: https://svnweb.freebsd.org/changeset/base/358809 Log: MFC r358299: 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-rpi04@hs-karlsruhe.de> Modified: stable/12/sys/dev/usb/net/if_muge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/net/if_muge.c ============================================================================== --- stable/12/sys/dev/usb/net/if_muge.c Mon Mar 9 13:44:51 2020 (r358808) +++ stable/12/sys/dev/usb/net/if_muge.c Mon Mar 9 14:13:40 2020 (r358809) @@ -1259,7 +1259,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 *); @@ -1971,7 +1971,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 {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003091413.029EDeC2037543>