Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/dpaa2/dpaa2_ni.c
| Show First 20 Lines • Show All 2,592 Lines • ▼ Show 20 Lines | case SIOCSIFMTU: | ||||
| if (error) { | if (error) { | ||||
| device_printf(dev, "%s: failed to update maximum frame " | device_printf(dev, "%s: failed to update maximum frame " | ||||
| "length: error=%d\n", __func__, error); | "length: error=%d\n", __func__, error); | ||||
| goto close_ni; | goto close_ni; | ||||
| } | } | ||||
| break; | break; | ||||
| case SIOCSIFCAP: | case SIOCSIFCAP: | ||||
| changed = if_getcapenable(ifp) ^ ifr->ifr_reqcap; | changed = if_getcapenable(ifp) ^ ifr->ifr_reqcap; | ||||
| if (changed & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) { | if ((changed & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) != 0) | ||||
| if ((ifr->ifr_reqcap & changed) & | if_togglecapenable(ifp, IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6); | ||||
| (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) { | if ((changed & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) != 0) | ||||
bz: dito | |||||
| if_setcapenablebit(ifp, | if_togglecapenable(ifp, IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); | ||||
Done Inline ActionsStyle would say this should be checked against != 0 If we are touching it, we should fix it ;-) bz: Style would say this should be checked against != 0
If we are touching it, we should fix it ;-) | |||||
Done Inline ActionsBoth fixed. tuexen: Both fixed. | |||||
| IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6, 0); | |||||
| } else { | |||||
| if_setcapenablebit(ifp, 0, | |||||
| IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6); | |||||
| } | |||||
| } | |||||
| if (changed & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) { | |||||
| if ((ifr->ifr_reqcap & changed) & | |||||
| (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) { | |||||
| if_setcapenablebit(ifp, | |||||
| IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6, 0); | |||||
| } else { | |||||
| if_setcapenablebit(ifp, 0, | |||||
| IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); | |||||
| } | |||||
| } | |||||
| rc = dpaa2_ni_setup_if_caps(sc); | rc = dpaa2_ni_setup_if_caps(sc); | ||||
| if (rc) { | if (rc) { | ||||
| printf("%s: failed to update iface capabilities: " | printf("%s: failed to update iface capabilities: " | ||||
| "error=%d\n", __func__, rc); | "error=%d\n", __func__, rc); | ||||
| rc = ENXIO; | rc = ENXIO; | ||||
| } | } | ||||
| break; | break; | ||||
| ▲ Show 20 Lines • Show All 1,118 Lines • Show Last 20 Lines | |||||
dito