u32 ring_buf_size;
u32 req_ext_size;
- /*
- * This is set by the caller to allow us to callback when we
- * receive a packet from the "wire"
- */
- int (*recv_cb)(struct hv_device *dev,
- struct hv_netvsc_packet *packet);
- void (*link_status_change)(struct hv_device *dev, u32 status);
-
- /* Specific to this driver */
- int (*send)(struct hv_device *dev, struct hv_netvsc_packet *packet);
-
};
static inline
drv->name = driver_name;
memcpy(&drv->dev_type, &netvsc_device_type, sizeof(struct hv_guid));
-
- driver->send = netvsc_send;
-
rndis_filter_init(driver);
return 0;
}
int ret;
net_drv_obj->ring_buf_size = ring_size * PAGE_SIZE;
- net_drv_obj->recv_cb = netvsc_recv_callback;
- net_drv_obj->link_status_change = netvsc_linkstatus_callback;
/* Callback to client driver to complete the initialization */
drv_init(&net_drv_obj->base);
ASSERT(Driver->OnLinkStatusChanged);
rndisDriver->OnLinkStatusChanged = Driver->OnLinkStatusChanged;*/
- /* Save the original dispatch handlers before we override it */
- rndis_filter.inner_drv.send = drv->send;
- rndis_filter.inner_drv.recv_cb = drv->recv_cb;
- rndis_filter.inner_drv.link_status_change =
- drv->link_status_change;
-
- /* Override */
- drv->send = rndis_filter_send;
- drv->recv_cb = rndis_filter_receive;
-
return 0;
}