Add TSO support on VLAN. Controller requires VLAN hardware tagging
to make TSO work on VLAN. So if VLAN hardware tagging is disabled explicitly clear TSO on VLAN. While I'm here remove duplicated VLAN_CAPABILITIES call.
This commit is contained in:
parent
0bad3ad189
commit
bd54d0edd7
@ -2816,7 +2816,7 @@ bge_attach(device_t dev)
|
||||
IFCAP_VLAN_MTU;
|
||||
if ((sc->bge_flags & BGE_FLAG_TSO) != 0) {
|
||||
ifp->if_hwassist |= CSUM_TSO;
|
||||
ifp->if_capabilities |= IFCAP_TSO4;
|
||||
ifp->if_capabilities |= IFCAP_TSO4 | IFCAP_VLAN_HWTSO;
|
||||
}
|
||||
#ifdef IFCAP_VLAN_HWCSUM
|
||||
ifp->if_capabilities |= IFCAP_VLAN_HWCSUM;
|
||||
@ -4526,9 +4526,6 @@ bge_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
|
||||
ifp->if_hwassist |= BGE_CSUM_FEATURES;
|
||||
else
|
||||
ifp->if_hwassist &= ~BGE_CSUM_FEATURES;
|
||||
#ifdef VLAN_CAPABILITIES
|
||||
VLAN_CAPABILITIES(ifp);
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((mask & IFCAP_TSO4) != 0 &&
|
||||
@ -4546,16 +4543,21 @@ bge_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
|
||||
bge_init(sc);
|
||||
}
|
||||
|
||||
if (mask & IFCAP_VLAN_HWTAGGING) {
|
||||
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;
|
||||
if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0)
|
||||
ifp->if_capenable &= ~IFCAP_VLAN_HWTSO;
|
||||
BGE_LOCK(sc);
|
||||
bge_setvlan(sc);
|
||||
BGE_UNLOCK(sc);
|
||||
#ifdef VLAN_CAPABILITIES
|
||||
VLAN_CAPABILITIES(ifp);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef VLAN_CAPABILITIES
|
||||
VLAN_CAPABILITIES(ifp);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
error = ether_ioctl(ifp, command, data);
|
||||
|
Loading…
Reference in New Issue
Block a user