Allow TX/RX checksum offloading to be configured independently.
This commit is contained in:
parent
38c0ce34b0
commit
24ec74fe04
@ -2923,14 +2923,20 @@ re_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
|
||||
}
|
||||
}
|
||||
#endif /* DEVICE_POLLING */
|
||||
if (mask & IFCAP_HWCSUM) {
|
||||
ifp->if_capenable ^= IFCAP_HWCSUM;
|
||||
if (ifp->if_capenable & IFCAP_TXCSUM)
|
||||
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 |= RE_CSUM_FEATURES;
|
||||
else
|
||||
ifp->if_hwassist &= ~RE_CSUM_FEATURES;
|
||||
reinit = 1;
|
||||
}
|
||||
if ((mask & IFCAP_RXCSUM) != 0 &&
|
||||
(ifp->if_capabilities & IFCAP_RXCSUM) != 0) {
|
||||
ifp->if_capenable ^= IFCAP_RXCSUM;
|
||||
reinit = 1;
|
||||
}
|
||||
if ((mask & IFCAP_TSO4) != 0 &&
|
||||
(ifp->if_capabilities & IFCAP_TSO) != 0) {
|
||||
ifp->if_capenable ^= IFCAP_TSO4;
|
||||
|
Loading…
x
Reference in New Issue
Block a user