Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/netvsc/hv_rndis_filter.c
Show First 20 Lines • Show All 1,006 Lines • ▼ Show 20 Lines | hv_rf_halt_device(struct hn_softc *sc) | ||||
return (0); | return (0); | ||||
} | } | ||||
/* | /* | ||||
* RNDIS filter on device add | * RNDIS filter on device add | ||||
*/ | */ | ||||
int | int | ||||
hv_rf_on_device_add(struct hn_softc *sc, void *additl_info, | hv_rf_on_device_add(struct hn_softc *sc, void *additl_info, | ||||
int *nchan0) | int *nchan0, int mtu) | ||||
{ | { | ||||
int ret; | int ret; | ||||
netvsc_device_info *dev_info = (netvsc_device_info *)additl_info; | netvsc_device_info *dev_info = (netvsc_device_info *)additl_info; | ||||
device_t dev = sc->hn_dev; | device_t dev = sc->hn_dev; | ||||
struct hn_nvs_subch_req *req; | struct hn_nvs_subch_req *req; | ||||
const struct hn_nvs_subch_resp *resp; | const struct hn_nvs_subch_resp *resp; | ||||
size_t resp_len; | size_t resp_len; | ||||
struct vmbus_xact *xact = NULL; | struct vmbus_xact *xact = NULL; | ||||
uint32_t status, nsubch; | uint32_t status, nsubch; | ||||
int nchan = *nchan0; | int nchan = *nchan0; | ||||
int rxr_cnt; | int rxr_cnt; | ||||
/* | /* | ||||
* Let the inner driver handle this first to create the netvsc channel | * Let the inner driver handle this first to create the netvsc channel | ||||
* NOTE! Once the channel is created, we may get a receive callback | * NOTE! Once the channel is created, we may get a receive callback | ||||
* (hv_rf_on_receive()) before this call is completed. | * (hv_rf_on_receive()) before this call is completed. | ||||
* Note: Earlier code used a function pointer here. | * Note: Earlier code used a function pointer here. | ||||
*/ | */ | ||||
ret = hv_nv_on_device_add(sc); | ret = hv_nv_on_device_add(sc, mtu); | ||||
if (ret != 0) | if (ret != 0) | ||||
return (ret); | return (ret); | ||||
/* | /* | ||||
* Initialize the rndis device | * Initialize the rndis device | ||||
*/ | */ | ||||
/* Send the rndis initialization message */ | /* Send the rndis initialization message */ | ||||
▲ Show 20 Lines • Show All 151 Lines • Show Last 20 Lines |