From owner-freebsd-hackers Mon Feb 26 10: 6: 3 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from phobos.talarian.com (mailhost.talarian.com [207.5.32.17]) by hub.freebsd.org (Postfix) with ESMTP id B85A437B503 for ; Mon, 26 Feb 2001 10:05:59 -0800 (PST) (envelope-from nsayer@quack.kfu.com) Received: from quack.kfu.com (beast.talarian.com [10.4.10.6] (may be forged)) by phobos.talarian.com (8.9.0/8.9.0) with ESMTP id KAA29913 for ; Mon, 26 Feb 2001 10:06:08 -0800 (PST) Message-ID: <3A9A9AFE.1080504@quack.kfu.com> Date: Mon, 26 Feb 2001 10:05:50 -0800 From: Nick Sayer User-Agent: Mozilla/5.0 (X11; U; FreeBSD 4.2-RELEASE i386; en-US; 0.8) Gecko/20010216 X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: 802.1q vlan patches for if_fxp Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG A colleague of mine has reported the necessity of adding this patch to if_fxp.c to support 802.1q vlans. I must admit that I am not familiar enough with the vlan code to understand what good this does. This patch is against 4.1-RELEASE. If it is a good thing, I would like to add it to -current and MFC it back in time for 4.3. If it isn't, I'd like to tell my friend why. Thanks in advance. ------------------------------------------------------------------------ *** pci/if_fxp.c.orig Wed Jul 19 09:36:36 2000 --- pci/if_fxp.c Tue Aug 8 23:18:37 2000 *************** *** 52,57 **** --- 52,65 ---- #include + #include "vlan.h" + #if NVLAN > 0 + #include + #include + #include + #include + #endif + #if defined(__NetBSD__) #include *************** *** 417,422 **** --- 425,433 ---- ether_ifattach(ifp, enaddr); bpfattach(&sc->sc_ethercom.ec_if.if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); + #if NVLAN > 0 + ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); + #endif /* * Add shutdown hook so that DMA is disabled prior to reboot. Not *************** *** 599,604 **** --- 610,618 ---- * Attach the interface. */ ether_ifattach(ifp, ETHER_BPF_SUPPORTED); + #if NVLAN > 0 + ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); + #endif /* * Let the system queue as many packets as we have available * TX descriptors. *** modules/fxp/Makefile.orig Fri Jan 28 05:26:29 2000 --- modules/fxp/Makefile Tue Aug 8 23:28:25 2000 *************** *** 2,7 **** .PATH: ${.CURDIR}/../../pci KMOD = if_fxp ! SRCS = if_fxp.c opt_bdg.h device_if.h bus_if.h pci_if.h .include --- 2,11 ---- .PATH: ${.CURDIR}/../../pci KMOD = if_fxp ! SRCS = if_fxp.c opt_bdg.h vlan.h device_if.h bus_if.h pci_if.h ! CLEANFILES = vlan.h ! ! vlan.h: ! touch vlan.h .include To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message