From c06663e28d152236fb3e27ce54f4e8a540acd85d Mon Sep 17 00:00:00 2001 From: yar Date: Sun, 23 May 2004 22:32:15 +0000 Subject: Consult parent's if_capenable for active VLAN-related capabilities. This change is possible since all the relevant drivers have been fixed to set if_capenable properly. The field if_capabilities tracks supported capabilities, which may be disabled administratively. Inheriting checksum offload support from the parent interface isn't that easy because the checksumming capabilities of the parent may be toggled on the fly. Disable the code for now. --- sys/net/if_vlan.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sys/net/if_vlan.c') diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 4810646..187ee9e 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -338,7 +338,7 @@ vlan_start(struct ifnet *ifp) * knows how to find the VLAN tag to use, so we attach a * packet tag that holds it. */ - if (p->if_capabilities & IFCAP_VLAN_HWTAGGING) { + if (p->if_capenable & IFCAP_VLAN_HWTAGGING) { struct m_tag *mtag = m_tag_alloc(MTAG_VLAN, MTAG_VLAN_TAG, sizeof (u_int), @@ -542,6 +542,12 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p) (IFF_BROADCAST | IFF_MULTICAST | IFF_SIMPLEX | IFF_POINTOPOINT)); ifv->ifv_if.if_link_state = p->if_link_state; +#if 0 + /* + * Not ready yet. We need notification from the parent + * when hw checksumming flags in its if_capenable change. + * Flags set in if_capabilities only are useless. + */ /* * If the parent interface can do hardware-assisted * VLAN encapsulation, then propagate its hardware- @@ -549,6 +555,7 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p) */ if (p->if_capabilities & IFCAP_VLAN_HWTAGGING) ifv->ifv_if.if_capabilities |= p->if_capabilities & IFCAP_HWCSUM; +#endif /* * Set up our ``Ethernet address'' to reflect the underlying -- cgit v1.1