Changeset View
Changeset View
Standalone View
Standalone View
sys/net/iflib.c
Show First 20 Lines • Show All 4,250 Lines • ▼ Show 20 Lines | case SIOCSIFCAP: | ||||
setmask = 0; | setmask = 0; | ||||
#ifdef TCP_OFFLOAD | #ifdef TCP_OFFLOAD | ||||
setmask |= mask & (IFCAP_TOE4|IFCAP_TOE6); | setmask |= mask & (IFCAP_TOE4|IFCAP_TOE6); | ||||
#endif | #endif | ||||
setmask |= (mask & IFCAP_FLAGS); | setmask |= (mask & IFCAP_FLAGS); | ||||
setmask |= (mask & IFCAP_WOL); | setmask |= (mask & IFCAP_WOL); | ||||
/* | /* | ||||
* If we're disabling any RX csum, disable all the ones | * If any RX csum has changed, change all the ones that | ||||
* the driver supports. This assumes all supported are | * are supported by the driver. | ||||
* enabled. | |||||
* | |||||
* Otherwise, if they've changed, enable all of them. | |||||
*/ | */ | ||||
if ((setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) < | if (setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) { | ||||
(oldmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6))) | setmask |= ctx->ifc_softc_ctx.isc_capabilities & | ||||
setmask &= ~(IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6); | (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6); | ||||
else if ((setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) != | } | ||||
(oldmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6))) | |||||
setmask |= (mask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)); | |||||
/* | /* | ||||
* want to ensure that traffic has stopped before we change any of the flags | * want to ensure that traffic has stopped before we change any of the flags | ||||
*/ | */ | ||||
if (setmask) { | if (setmask) { | ||||
CTX_LOCK(ctx); | CTX_LOCK(ctx); | ||||
bits = if_getdrvflags(ifp); | bits = if_getdrvflags(ifp); | ||||
if (bits & IFF_DRV_RUNNING && setmask & ~IFCAP_WOL) | if (bits & IFF_DRV_RUNNING && setmask & ~IFCAP_WOL) | ||||
▲ Show 20 Lines • Show All 2,346 Lines • Show Last 20 Lines |