Date: Mon, 12 Jan 2009 03:32:55 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r187078 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/vge Message-ID: <200901120332.n0C3Wt9V047252@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Mon Jan 12 03:32:54 2009 New Revision: 187078 URL: http://svn.freebsd.org/changeset/base/187078 Log: MFC r184908: Fix Rx/Tx checksum offload ioctl handling. Now checksum offload can be controlled by ifconfig(8). Note, VLAN hardware tagging controls still lacks required handler but it requires more driver cleanups so I didn't touch that part. PR: kern/128766 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/vge/if_vge.c Modified: stable/7/sys/dev/vge/if_vge.c ============================================================================== --- stable/7/sys/dev/vge/if_vge.c Mon Jan 12 03:26:52 2009 (r187077) +++ stable/7/sys/dev/vge/if_vge.c Mon Jan 12 03:32:54 2009 (r187078) @@ -2226,15 +2226,17 @@ vge_ioctl(ifp, command, data) } } #endif /* DEVICE_POLLING */ - if (mask & IFCAP_HWCSUM) { - ifp->if_capenable |= ifr->ifr_reqcap & (IFCAP_HWCSUM); - if (ifp->if_capenable & IFCAP_TXCSUM) - ifp->if_hwassist = VGE_CSUM_FEATURES; + if ((mask & IFCAP_TXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { + ifp->if_capenable ^= IFCAP_TXCSUM; + if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) + ifp->if_hwassist |= VGE_CSUM_FEATURES; else - ifp->if_hwassist = 0; - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - vge_init(sc); + ifp->if_hwassist &= ~VGE_CSUM_FEATURES; } + if ((mask & IFCAP_RXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_RXCSUM) != 0) + ifp->if_capenable ^= IFCAP_RXCSUM; } break; default:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901120332.n0C3Wt9V047252>