Page MenuHomeFreeBSD

D7240.id18529.diff
No OneTemporary

D7240.id18529.diff

Index: sys/dev/hyperv/include/hyperv.h
===================================================================
--- sys/dev/hyperv/include/hyperv.h
+++ sys/dev/hyperv/include/hyperv.h
@@ -58,8 +58,6 @@
#include <amd64/include/atomic.h>
#include <dev/hyperv/include/hyperv_busdma.h>
-typedef uint8_t hv_bool_uint8_t;
-
#define HV_S_OK 0x00000000
#define HV_E_FAIL 0x80004005
#define HV_ERROR_NOT_SUPPORTED 0x80070032
@@ -90,8 +88,6 @@
int hyperv_guid2str(const struct hyperv_guid *, char *, size_t);
-#define HW_MACADDR_LEN 6
-
/*
* Common defines for Hyper-V ICs
*/
Index: sys/dev/hyperv/netvsc/hv_net_vsc.h
===================================================================
--- sys/dev/hyperv/netvsc/hv_net_vsc.h
+++ sys/dev/hyperv/netvsc/hv_net_vsc.h
@@ -53,6 +53,7 @@
#include <netinet/in.h>
#include <netinet/tcp_lro.h>
+#include <net/ethernet.h>
#include <net/if.h>
#include <net/if_media.h>
@@ -1065,12 +1066,12 @@
nvsp_msg channel_init_packet;
nvsp_msg revoke_packet;
- /*uint8_t hw_mac_addr[HW_MACADDR_LEN];*/
+ /*uint8_t hw_mac_addr[ETHER_ADDR_LEN];*/
/* Holds rndis device info */
void *extension;
- hv_bool_uint8_t destroy;
+ uint8_t destroy;
/* Negotiated NVSP version */
uint32_t nvsp_version;
@@ -1109,7 +1110,7 @@
#endif
typedef struct netvsc_packet_ {
- hv_bool_uint8_t is_data_pkt; /* One byte */
+ uint8_t is_data_pkt; /* One byte */
uint16_t vlan_tci;
uint32_t status;
@@ -1140,7 +1141,7 @@
typedef struct {
uint8_t mac_addr[6]; /* Assumption unsigned long */
- hv_bool_uint8_t link_state;
+ uint8_t link_state;
} netvsc_device_info;
#ifndef HN_USE_TXDESC_BUFRING
Index: sys/dev/hyperv/netvsc/hv_rndis_filter.h
===================================================================
--- sys/dev/hyperv/netvsc/hv_rndis_filter.h
+++ sys/dev/hyperv/netvsc/hv_rndis_filter.h
@@ -31,6 +31,8 @@
#ifndef __HV_RNDIS_FILTER_H__
#define __HV_RNDIS_FILTER_H__
+#include <sys/param.h>
+#include <net/ethernet.h>
/*
* Defines
@@ -103,7 +105,7 @@
STAILQ_HEAD(RQ, rndis_request_) myrequest_list;
- uint8_t hw_mac_addr[HW_MACADDR_LEN];
+ uint8_t hw_mac_addr[ETHER_ADDR_LEN];
} rndis_device;
/*
Index: sys/dev/hyperv/netvsc/hv_rndis_filter.c
===================================================================
--- sys/dev/hyperv/netvsc/hv_rndis_filter.c
+++ sys/dev/hyperv/netvsc/hv_rndis_filter.c
@@ -699,7 +699,7 @@
static inline int
hv_rf_query_device_mac(rndis_device *device)
{
- uint32_t size = HW_MACADDR_LEN;
+ uint32_t size = ETHER_ADDR_LEN;
return (hv_rf_query_device(device,
RNDIS_OID_802_3_PERMANENT_ADDRESS, device->hw_mac_addr, &size));
@@ -1126,7 +1126,7 @@
"hv_rf_send_offload_request failed, ret=%d\n", ret);
}
- memcpy(dev_info->mac_addr, rndis_dev->hw_mac_addr, HW_MACADDR_LEN);
+ memcpy(dev_info->mac_addr, rndis_dev->hw_mac_addr, ETHER_ADDR_LEN);
hv_rf_query_device_link_status(rndis_dev);

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 8, 11:01 PM (3 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15727174
Default Alt Text
D7240.id18529.diff (2 KB)

Event Timeline