lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 06 Jan 2009 09:40:45 +0000
From:	Mark McLoughlin <markmc@...hat.com>
To:	Stephen Hemminger <shemminger@...tta.com>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH 5/8] virtio: convert to net_device_ops

On Mon, 2009-01-05 at 12:14 -0800, Stephen Hemminger wrote:

> Signed-off-by: Stephen Hemminger <shemminger@...tta.com>
> 
> 
> --- a/drivers/net/virtio_net.c	2009-01-05 11:24:44.578819161 -0800
> +++ b/drivers/net/virtio_net.c	2009-01-05 12:11:17.169569416 -0800
> @@ -624,6 +624,18 @@ static int virtnet_change_mtu(struct net
>  	return 0;
>  }
>  
> +static const struct net_device_ops virtnet_netdev = {
> +	.ndo_open            = virtnet_open,
> +	.ndo_stop   	     = virtnet_close,
> +	.ndo_start_xmit      = start_xmit,
> +	.ndo_validate_addr   = eth_validate_addr,
> +	.ndo_set_mac_address = eth_mac_addr,
> +	.ndo_change_mtu	     = virtnet_change_mtu,
> +#ifdef CONFIG_NET_POLL_CONTROLLER
> +	.ndo_poll_controller = virtnet_netpoll,
> +#endif
> +};
> +
>  static int virtnet_probe(struct virtio_device *vdev)
>  {
>  	int err;
> @@ -636,14 +648,8 @@ static int virtnet_probe(struct virtio_d
>  		return -ENOMEM;
>  
>  	/* Set up network device as normal. */
> -	dev->open = virtnet_open;
> -	dev->stop = virtnet_close;
> -	dev->hard_start_xmit = start_xmit;
> -	dev->change_mtu = virtnet_change_mtu;
> +	dev->netdev_ops = &virtnet_netdev;
>  	dev->features = NETIF_F_HIGHDMA;
> -#ifdef CONFIG_NET_POLL_CONTROLLER
> -	dev->poll_controller = virtnet_netpoll;
> -#endif

Looks good to me.

Acked-by: Mark McLoughlin <markmc@...hat.com>

Thanks,
Mark.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ