/* Callback from the network layer when the velocity is being deactivated by the network layer  */
static int velocity_close(struct net_device *dev)
/* Callback from the network layer when the velocity is being deactivated by the network layer  */
static int velocity_close(struct net_device *dev)
{
	struct velocity_info *vptr = netdev_priv(dev);
	napi_disable(&vptr->napi);
	netif_stop_queue(dev);
	velocity_shutdown(vptr);
	if (vptr->flags & VELOCITY_FLAGS_WOL_ENABLED)
		velocity_get_ip(vptr);
	if (dev->irq != 0)
		free_irq(dev->irq, dev);
	pci_set_power_state(vptr->pdev, PCI_D3hot);
	velocity_free_rings(vptr);
	vptr->flags &= (~VELOCITY_FLAGS_OPENED);
	return 0;
}