aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fxp
diff options
context:
space:
mode:
authorPyun YongHyeon <yongari@FreeBSD.org>2010-11-03 01:26:11 +0000
committerPyun YongHyeon <yongari@FreeBSD.org>2010-11-03 01:26:11 +0000
commit70a755e6ca586730d025ca5320140bf8e61b160e (patch)
tree7c2f7e41c3e8eaa1bd0669d19d6ef93d6d62e0a4 /sys/dev/fxp
parentc51a786543ebcb1a8cbdb3e2a3b206a223d6a932 (diff)
Notes
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r--sys/dev/fxp/if_fxp.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 25cd20c5dd6a..6493395dbeb9 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -859,9 +859,9 @@ fxp_attach(device_t dev)
ifp->if_capenable |= IFCAP_VLAN_MTU; /* the hw bits already set */
if ((sc->flags & FXP_FLAG_EXT_RFA) != 0) {
ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING |
- IFCAP_VLAN_HWCSUM;
+ IFCAP_VLAN_HWCSUM | IFCAP_VLAN_HWTSO;
ifp->if_capenable |= IFCAP_VLAN_HWTAGGING |
- IFCAP_VLAN_HWCSUM;
+ IFCAP_VLAN_HWCSUM | IFCAP_VLAN_HWTSO;
}
/*
@@ -2855,10 +2855,19 @@ fxp_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
if (ifp->if_flags & IFF_UP)
reinit++;
}
+ if ((mask & IFCAP_VLAN_HWCSUM) != 0 &&
+ (ifp->if_capabilities & IFCAP_VLAN_HWCSUM) != 0)
+ ifp->if_capenable ^= IFCAP_VLAN_HWCSUM;
+ if ((mask & IFCAP_VLAN_HWTSO) != 0 &&
+ (ifp->if_capabilities & IFCAP_VLAN_HWTSO) != 0)
+ ifp->if_capenable ^= IFCAP_VLAN_HWTSO;
if ((mask & IFCAP_VLAN_HWTAGGING) != 0 &&
(ifp->if_capabilities & IFCAP_VLAN_HWTAGGING) != 0) {
ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING;
- reinit++;
+ if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0)
+ ifp->if_capenable &=
+ ~(IFCAP_VLAN_HWTSO | IFCAP_VLAN_HWCSUM);
+ reinit++;
}
if (reinit > 0 && ifp->if_flags & IFF_UP)
fxp_init_body(sc);