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]
Message-ID: <20081122004513.GE32518@solarflare.com>
Date:	Sat, 22 Nov 2008 00:45:14 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Stephen Hemminger <shemminger@...tta.com>
Cc:	David Miller <davem@...emloft.net>,
	Jeff Garzik <jgarzik@...ox.com>, netdev@...r.kernel.org
Subject: Re: [PATCH 11/22] efx: convert to net_device_ops

Stephen Hemminger wrote:
> Convert driver to new net_device_ops. Compile tested only.
> 
> Signed-off-by: Stephen Hemminger <shemminger@...tta.com>

Acked-by: Ben Hutchings <bhutchings@...arflare.com>

(But the driver name is sfc; "efx" is an historical reference.)

> --- a/drivers/net/sfc/efx.c	2008-11-21 13:57:58.000000000 -0800
> +++ b/drivers/net/sfc/efx.c	2008-11-21 14:09:48.000000000 -0800
> @@ -1433,12 +1433,28 @@ static void efx_set_multicast_list(struc
>  	falcon_set_multicast_hash(efx);
>  }
>  
> +static const struct net_device_ops efx_netdev_ops = {
> +	.ndo_open		= efx_net_open,
> +	.ndo_stop		= efx_net_stop,
> +	.ndo_get_stats		= efx_net_stats,
> +	.ndo_tx_timeout		= efx_watchdog,
> +	.ndo_start_xmit		= efx_hard_start_xmit,
> +	.ndo_validate_addr	= eth_validate_addr,
> +	.ndo_do_ioctl		= efx_ioctl,
> +	.ndo_change_mtu		= efx_change_mtu,
> +	.ndo_set_mac_address	= efx_set_mac_address,
> +	.ndo_set_multicast_list = efx_set_multicast_list,
> +#ifdef CONFIG_NET_POLL_CONTROLLER
> +	.ndo_poll_controller = efx_netpoll,
> +#endif
> +};
> +
>  static int efx_netdev_event(struct notifier_block *this,
>  			    unsigned long event, void *ptr)
>  {
>  	struct net_device *net_dev = ptr;
>  
> -	if (net_dev->open == efx_net_open && event == NETDEV_CHANGENAME) {
> +	if (net_dev->netdev_ops == &efx_netdev_ops && event == NETDEV_CHANGENAME) {

Also, this line should be wrapped now.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
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