hyperv/hn: Define empty packet filter.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8342
This commit is contained in:
Sepherosa Ziehau 2016-10-27 04:55:19 +00:00
parent 5341cc1c91
commit 14a31e99d7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=307987
3 changed files with 4 additions and 3 deletions

View File

@ -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.

View File

@ -106,7 +106,7 @@ int hn_rndis_query_rsscaps(struct hn_softc *sc, int *rxr_cnt);
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);

View File

@ -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