summaryrefslogtreecommitdiffstats
path: root/sys/net/if_vlan.c
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2004-05-23 22:32:15 +0000
committeryar <yar@FreeBSD.org>2004-05-23 22:32:15 +0000
commitc06663e28d152236fb3e27ce54f4e8a540acd85d (patch)
tree3c891c58e0cc57929f94b6a773c5fd017f10e6d5 /sys/net/if_vlan.c
parentf3abcf3aa7329c307464f3c684bc478b05b2a668 (diff)
downloadFreeBSD-src-c06663e28d152236fb3e27ce54f4e8a540acd85d.zip
FreeBSD-src-c06663e28d152236fb3e27ce54f4e8a540acd85d.tar.gz
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.
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r--sys/net/if_vlan.c9
1 files changed, 8 insertions, 1 deletions
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
OpenPOWER on IntegriCloud