All caller's already have pointer to netvsc_device so pass it.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
int rndis_filter_close(struct netvsc_device *nvdev);
int rndis_filter_device_add(struct hv_device *dev,
struct netvsc_device_info *info);
-void rndis_filter_device_remove(struct hv_device *dev);
+void rndis_filter_device_remove(struct hv_device *dev,
+ struct netvsc_device *nvdev);
int rndis_filter_set_rss_param(struct rndis_device *rdev,
const u8 *key, int num_queue);
int rndis_filter_receive(struct net_device *ndev,
return ret;
net_device_ctx->start_remove = true;
- rndis_filter_device_remove(dev);
+ rndis_filter_device_remove(dev, nvdev);
ret = netvsc_set_queues(net, dev, count);
if (ret == 0)
goto out;
ndevctx->start_remove = true;
- rndis_filter_device_remove(hdev);
+ rndis_filter_device_remove(hdev, nvdev);
ndev->mtu = mtu;
ret = register_netdev(net);
if (ret != 0) {
pr_err("Unable to register netdev.\n");
- rndis_filter_device_remove(dev);
+ rndis_filter_device_remove(dev, nvdev);
netvsc_free_netdev(net);
}
* Call to the vsc driver to let it know that the device is being
* removed
*/
- rndis_filter_device_remove(dev);
+ rndis_filter_device_remove(dev, ndev_ctx->nvdev);
hv_set_drvdata(dev, NULL);
/* Send the rndis initialization message */
ret = rndis_filter_init_device(rndis_device);
if (ret != 0) {
- rndis_filter_device_remove(dev);
+ rndis_filter_device_remove(dev, net_device);
return ret;
}
/* Get the mac address */
ret = rndis_filter_query_device_mac(rndis_device);
if (ret != 0) {
- rndis_filter_device_remove(dev);
+ rndis_filter_device_remove(dev, net_device);
return ret;
}
/* Find HW offload capabilities */
ret = rndis_query_hwcaps(rndis_device, &hwcaps);
if (ret != 0) {
- rndis_filter_device_remove(dev);
+ rndis_filter_device_remove(dev, net_device);
return ret;
}
return 0; /* return 0 because primary channel can be used alone */
err_dev_remv:
- rndis_filter_device_remove(dev);
+ rndis_filter_device_remove(dev, net_device);
return ret;
}
-void rndis_filter_device_remove(struct hv_device *dev)
+void rndis_filter_device_remove(struct hv_device *dev,
+ struct netvsc_device *net_dev)
{
- struct netvsc_device *net_dev = hv_device_to_netvsc_device(dev);
struct rndis_device *rndis_dev = net_dev->extension;
/* If not all subchannel offers are complete, wait for them until