svn commit: r304255 - head/sys/dev/hyperv/netvsc
Sepherosa Ziehau
sephe at FreeBSD.org
Wed Aug 17 05:45:58 UTC 2016
Author: sephe
Date: Wed Aug 17 05:45:57 2016
New Revision: 304255
URL: https://svnweb.freebsd.org/changeset/base/304255
Log:
hyperv/hn: Remove reference to nvsp_status
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7517
Modified:
head/sys/dev/hyperv/netvsc/hv_net_vsc.c
head/sys/dev/hyperv/netvsc/hv_rndis_filter.c
Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c
==============================================================================
--- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Wed Aug 17 05:34:02 2016 (r304254)
+++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Wed Aug 17 05:45:57 2016 (r304255)
@@ -852,7 +852,7 @@ hv_nv_on_receive(netvsc_dev *net_dev, st
netvsc_packet *net_vsc_pkt = &vsc_pkt;
int count = 0;
int i = 0;
- int status = nvsp_status_success;
+ int status = HN_NVS_STATUS_OK;
/* Make sure that this is a RNDIS message. */
nvs_hdr = VMBUS_CHANPKT_CONST_DATA(pkthdr);
@@ -874,15 +874,16 @@ hv_nv_on_receive(netvsc_dev *net_dev, st
/* Each range represents 1 RNDIS pkt that contains 1 Ethernet frame */
for (i = 0; i < count; i++) {
- net_vsc_pkt->status = nvsp_status_success;
+ net_vsc_pkt->status = HN_NVS_STATUS_OK;
net_vsc_pkt->data = ((uint8_t *)net_dev->rx_buf +
pkt->cp_rxbuf[i].rb_ofs);
net_vsc_pkt->tot_data_buf_len = pkt->cp_rxbuf[i].rb_len;
hv_rf_on_receive(net_dev, rxr, net_vsc_pkt);
- if (net_vsc_pkt->status != nvsp_status_success) {
- status = nvsp_status_failure;
- }
+
+ /* XXX pretty broken; whack it */
+ if (net_vsc_pkt->status != HN_NVS_STATUS_OK)
+ status = HN_NVS_STATUS_FAILED;
}
/*
Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c
==============================================================================
--- head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Wed Aug 17 05:34:02 2016 (r304254)
+++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Wed Aug 17 05:45:57 2016 (r304255)
@@ -544,7 +544,7 @@ hv_rf_receive_data(struct hn_rx_ring *rx
pkt->tot_data_buf_len -= data_offset;
if (pkt->tot_data_buf_len < rndis_pkt->data_length) {
- pkt->status = nvsp_status_failure;
+ pkt->status = HN_NVS_STATUS_FAILED;
if_printf(rxr->hn_ifp,
"total length %u is less than data length %u\n",
pkt->tot_data_buf_len, rndis_pkt->data_length);
@@ -555,7 +555,7 @@ hv_rf_receive_data(struct hn_rx_ring *rx
pkt->data = (void *)((unsigned long)pkt->data + data_offset);
if (hv_rf_find_recvinfo(rndis_pkt, &info)) {
- pkt->status = nvsp_status_failure;
+ pkt->status = HN_NVS_STATUS_FAILED;
if_printf(rxr->hn_ifp, "recvinfo parsing failed\n");
return;
}
@@ -580,13 +580,13 @@ hv_rf_on_receive(netvsc_dev *net_dev,
/* Make sure the rndis device state is initialized */
if (net_dev->extension == NULL) {
- pkt->status = nvsp_status_failure;
+ pkt->status = HN_NVS_STATUS_FAILED;
return (ENODEV);
}
rndis_dev = (rndis_device *)net_dev->extension;
if (rndis_dev->state == RNDIS_DEV_UNINITIALIZED) {
- pkt->status = nvsp_status_failure;
+ pkt->status = HN_NVS_STATUS_FAILED;
return (EINVAL);
}
More information about the svn-src-head
mailing list