svn commit: r307987 - in head/sys: dev/hyperv/netvsc net

Sepherosa Ziehau sephe at FreeBSD.org
Thu Oct 27 04:55:20 UTC 2016


Author: sephe
Date: Thu Oct 27 04:55:19 2016
New Revision: 307987
URL: https://svnweb.freebsd.org/changeset/base/307987

Log:
  hyperv/hn: Define empty packet filter.
  
  MFC after:	1 week
  Sponsored by:	Microsoft
  Differential Revision:	https://reviews.freebsd.org/D8342

Modified:
  head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
  head/sys/dev/hyperv/netvsc/if_hnvar.h
  head/sys/net/rndis.h

Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
==============================================================================
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c	Thu Oct 27 04:42:39 2016	(r307986)
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c	Thu Oct 27 04:55:19 2016	(r307987)
@@ -3849,8 +3849,8 @@ hn_suspend_data(struct hn_softc *sc)
 	/*
 	 * Disable RX by clearing RX filter.
 	 */
-	hn_rndis_set_rxfilter(sc, 0);
-	sc->hn_rx_filter = 0;
+	sc->hn_rx_filter = NDIS_PACKET_TYPE_NONE;
+	hn_rndis_set_rxfilter(sc, sc->hn_rx_filter);
 
 	/*
 	 * Give RNDIS enough time to flush all pending data packets.

Modified: head/sys/dev/hyperv/netvsc/if_hnvar.h
==============================================================================
--- head/sys/dev/hyperv/netvsc/if_hnvar.h	Thu Oct 27 04:42:39 2016	(r307986)
+++ head/sys/dev/hyperv/netvsc/if_hnvar.h	Thu Oct 27 04:55:19 2016	(r307987)
@@ -106,7 +106,7 @@ int		hn_rndis_query_rsscaps(struct hn_so
 int		hn_rndis_get_eaddr(struct hn_softc *sc, uint8_t *eaddr);
 int		hn_rndis_get_linkstatus(struct hn_softc *sc,
 		    uint32_t *link_status);
-/* filter: NDIS_PACKET_TYPE_ or 0. */
+/* filter: NDIS_PACKET_TYPE_. */
 int		hn_rndis_set_rxfilter(struct hn_softc *sc, uint32_t filter);
 
 int		hn_nvs_attach(struct hn_softc *sc, int mtu);

Modified: head/sys/net/rndis.h
==============================================================================
--- head/sys/net/rndis.h	Thu Oct 27 04:42:39 2016	(r307986)
+++ head/sys/net/rndis.h	Thu Oct 27 04:55:19 2016	(r307987)
@@ -352,6 +352,7 @@ struct rndis_keepalive_comp {
 };
 
 /* Packet filter bits used by OID_GEN_CURRENT_PACKET_FILTER */
+#define	NDIS_PACKET_TYPE_NONE			0x00000000
 #define	NDIS_PACKET_TYPE_DIRECTED		0x00000001
 #define	NDIS_PACKET_TYPE_MULTICAST		0x00000002
 #define	NDIS_PACKET_TYPE_ALL_MULTICAST		0x00000004


More information about the svn-src-all mailing list