Module Name:    src
Committed By:   hikaru
Date:           Thu Aug 14 05:42:16 UTC 2014

Modified Files:
        src/sys/arch/x86/pci: if_vmx.c

Log Message:
Set ifflags callback so that the device can enter promiscuous mode.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x86/pci/if_vmx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/pci/if_vmx.c
diff -u src/sys/arch/x86/pci/if_vmx.c:1.4 src/sys/arch/x86/pci/if_vmx.c:1.5
--- src/sys/arch/x86/pci/if_vmx.c:1.4	Sat Jul 19 06:12:24 2014
+++ src/sys/arch/x86/pci/if_vmx.c	Thu Aug 14 05:42:16 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vmx.c,v 1.4 2014/07/19 06:12:24 hikaru Exp $	*/
+/*	$NetBSD: if_vmx.c,v 1.5 2014/08/14 05:42:16 hikaru Exp $	*/
 /*	$OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.4 2014/07/19 06:12:24 hikaru Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.5 2014/08/14 05:42:16 hikaru Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -158,6 +158,7 @@ void vmxnet3_evintr(struct vmxnet3_softc
 void vmxnet3_txintr(struct vmxnet3_softc *, struct vmxnet3_txqueue *);
 void vmxnet3_rxintr(struct vmxnet3_softc *, struct vmxnet3_rxqueue *);
 void vmxnet3_iff(struct vmxnet3_softc *);
+int vmxnet3_ifflags_cb(struct ethercom *);
 void vmxnet3_rx_csum(struct vmxnet3_rxcompdesc *, struct mbuf *);
 int vmxnet3_getbuf(struct vmxnet3_softc *, struct vmxnet3_rxring *);
 void vmxnet3_stop(struct ifnet *, int disable);
@@ -308,6 +309,7 @@ vmxnet3_attach(device_t parent, device_t
 
 	if_attach(ifp);
 	ether_ifattach(ifp, enaddr);
+	ether_set_ifflags_cb(&sc->sc_ethercom, vmxnet3_ifflags_cb);
 	vmxnet3_link_state(sc);
 }
 
@@ -859,6 +861,15 @@ setit:
 	WRITE_CMD(sc, VMXNET3_CMD_SET_RXMODE);
 }
 
+int
+vmxnet3_ifflags_cb(struct ethercom *ec)
+{
+
+	vmxnet3_iff((struct vmxnet3_softc *)ec->ec_if.if_softc);
+
+	return 0;
+}
+
 
 void
 vmxnet3_rx_csum(struct vmxnet3_rxcompdesc *rxcd, struct mbuf *m)

Reply via email to