mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-29 13:15:05 +00:00
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
This commit is contained in:
parent
3dddcecced
commit
20f9ef43cb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=184908
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue