aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/re
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2006-03-03 12:32:51 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2006-03-03 12:32:51 +0000
commitf051cb85e815754c76718aa4bdf96f1318116a94 (patch)
tree01de4a0bc33c10e3f078a837c4325b21f76da453 /sys/dev/re
parente2779391fa07c40a4ea396764298943311b80747 (diff)
Notes
Diffstat (limited to 'sys/dev/re')
-rw-r--r--sys/dev/re/if_re.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c
index 8b86714fbcdb..4abc3d8782c8 100644
--- a/sys/dev/re/if_re.c
+++ b/sys/dev/re/if_re.c
@@ -2335,7 +2335,10 @@ re_ioctl(ifp, command, data)
break;
case SIOCSIFCAP:
{
- int mask = ifr->ifr_reqcap ^ ifp->if_capenable;
+ int mask, reinit;
+
+ mask = ifr->ifr_reqcap ^ ifp->if_capenable;
+ reinit = 0;
#ifdef DEVICE_POLLING
if (mask & IFCAP_POLLING) {
if (ifr->ifr_reqcap & IFCAP_POLLING) {
@@ -2359,16 +2362,19 @@ re_ioctl(ifp, command, data)
}
#endif /* DEVICE_POLLING */
if (mask & IFCAP_HWCSUM) {
- RL_LOCK(sc);
- ifp->if_capenable |= ifr->ifr_reqcap & IFCAP_HWCSUM;
+ ifp->if_capenable ^= IFCAP_HWCSUM;
if (ifp->if_capenable & IFCAP_TXCSUM)
ifp->if_hwassist = RE_CSUM_FEATURES;
else
ifp->if_hwassist = 0;
- if (ifp->if_drv_flags & IFF_DRV_RUNNING)
- re_init_locked(sc);
- RL_UNLOCK(sc);
+ reinit = 1;
+ }
+ if (mask & IFCAP_VLAN_HWTAGGING) {
+ ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING;
+ reinit = 1;
}
+ if (reinit && ifp->if_drv_flags & IFF_DRV_RUNNING)
+ re_init(sc);
}
break;
default: