svn commit: r304972 - head/sys/dev/hyperv/netvsc
Sepherosa Ziehau
sephe at FreeBSD.org
Mon Aug 29 03:22:57 UTC 2016
Author: sephe
Date: Mon Aug 29 03:22:56 2016
New Revision: 304972
URL: https://svnweb.freebsd.org/changeset/base/304972
Log:
hyperv/hn: Add definition for NDIS media state.
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7652
Modified:
head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
head/sys/dev/hyperv/netvsc/ndis.h
Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
==============================================================================
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Aug 29 01:59:18 2016 (r304971)
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Aug 29 03:22:56 2016 (r304972)
@@ -117,9 +117,11 @@ __FBSDID("$FreeBSD$");
#include <dev/hyperv/include/hyperv_busdma.h>
#include <dev/hyperv/include/vmbus_xact.h>
-#include "hv_net_vsc.h"
-#include "hv_rndis.h"
-#include "hv_rndis_filter.h"
+#include <dev/hyperv/netvsc/hv_net_vsc.h>
+#include <dev/hyperv/netvsc/hv_rndis.h>
+#include <dev/hyperv/netvsc/hv_rndis_filter.h>
+#include <dev/hyperv/netvsc/ndis.h>
+
#include "vmbus_if.h"
/* Short for Hyper-V network interface */
@@ -584,7 +586,7 @@ netvsc_attach(device_t dev)
}
#endif
- if (device_info.link_state == 0) {
+ if (device_info.link_state == NDIS_MEDIA_STATE_CONNECTED) {
sc->hn_carrier = 1;
}
Modified: head/sys/dev/hyperv/netvsc/ndis.h
==============================================================================
--- head/sys/dev/hyperv/netvsc/ndis.h Mon Aug 29 01:59:18 2016 (r304971)
+++ head/sys/dev/hyperv/netvsc/ndis.h Mon Aug 29 03:22:56 2016 (r304972)
@@ -29,6 +29,9 @@
#ifndef _NET_NDIS_H_
#define _NET_NDIS_H_
+#define NDIS_MEDIA_STATE_CONNECTED 0
+#define NDIS_MEDIA_STATE_DISCONNECTED 1
+
#define OID_TCP_OFFLOAD_PARAMETERS 0xFC01020C
#define NDIS_OBJTYPE_DEFAULT 0x80
More information about the svn-src-head
mailing list