1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

hyperv/hn: Move OIDs to net/rndis.h; they are standard NDIS OIDs.

Actually all OIDs defined in net/rndis.h are standard NDIS OIDs.
While I'm here, use the verbose macro name as in NDIS spec.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7679
This commit is contained in:
Sepherosa Ziehau 2016-08-30 02:55:07 +00:00
parent adbe268544
commit 8bb1a21b56
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305044
3 changed files with 9 additions and 8 deletions

View File

@ -941,7 +941,7 @@ hn_rndis_get_rsscaps(struct hn_softc *sc, int *rxr_cnt)
in.ndis_hdr.ndis_size = NDIS_RSS_CAPS_SIZE;
caps_len = NDIS_RSS_CAPS_SIZE;
error = hn_rndis_query(sc, OID_GEN_RSS_CAPABILITIES,
error = hn_rndis_query(sc, OID_GEN_RECEIVE_SCALE_CAPABILITIES,
&in, NDIS_RSS_CAPS_SIZE, &caps, &caps_len);
if (error)
return (error);
@ -1092,7 +1092,8 @@ hn_rndis_conf_rss(struct hn_softc *sc, int nchan)
for (i = 0; i < NDIS_HASH_INDCNT; ++i)
rss->rss_ind[i] = i % nchan;
error = hn_rndis_set(sc, OID_GEN_RSS_PARAMETERS, rss, sizeof(*rss));
error = hn_rndis_set(sc, OID_GEN_RECEIVE_SCALE_PARAMETERS,
rss, sizeof(*rss));
if (error) {
if_printf(sc->hn_ifp, "RSS config failed: %d\n", error);
} else {

View File

@ -32,10 +32,6 @@
#define NDIS_MEDIA_STATE_CONNECTED 0
#define NDIS_MEDIA_STATE_DISCONNECTED 1
#define OID_GEN_RSS_CAPABILITIES 0x00010203
#define OID_GEN_RSS_PARAMETERS 0x00010204
#define OID_TCP_OFFLOAD_PARAMETERS 0xFC01020C
#define NDIS_OBJTYPE_DEFAULT 0x80
#define NDIS_OBJTYPE_RSS_CAPS 0x88
#define NDIS_OBJTYPE_RSS_PARAMS 0x89
@ -143,7 +139,7 @@ struct ndis_offload_params {
#define NDIS_OFFLOAD_RSC_ON 2
/*
* OID_GEN_RSS_CAPABILITIES
* OID_GEN_RECEIVE_SCALE_CAPABILITIES
* ndis_type: NDIS_OBJTYPE_RSS_CAPS
*/
struct ndis_rss_caps {
@ -174,7 +170,7 @@ struct ndis_rss_caps {
#define NDIS_RSS_CAP_HASH_TOEPLITZ 0x00000001
/*
* OID_GEN_RSS_PARAMETERS
* OID_GEN_RECEIVE_SCALE_PARAMETERS
* ndis_type: NDIS_OBJTYPE_RSS_PARAMS
*/
struct ndis_rss_params {

View File

@ -62,6 +62,8 @@
#define OID_GEN_SUPPORTED_GUIDS 0x00010117
#define OID_GEN_NETWORK_LAYER_ADDRESSES 0x00010118
#define OID_GEN_TRANSPORT_HEADER_OFFSET 0x00010119
#define OID_GEN_RECEIVE_SCALE_CAPABILITIES 0x00010203
#define OID_GEN_RECEIVE_SCALE_PARAMETERS 0x00010204
#define OID_GEN_MACHINE_NAME 0x0001021A
#define OID_GEN_RNDIS_CONFIG_PARAMETER 0x0001021B
#define OID_GEN_VLAN_ID 0x0001021C
@ -82,6 +84,8 @@
#define OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206
#define OID_802_3_XMIT_LATE_COLLISIONS 0x01020207
#define OID_TCP_OFFLOAD_PARAMETERS 0xFC01020C
#define RNDIS_MEDIUM_802_3 0x00000000
/* Device flags */