diff mbox

[29/77] usbnet: convert dms9601 driver to net_device_ops

Message ID 20090321053714.737716531@vyatta.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

stephen hemminger March 21, 2009, 5:35 a.m. UTC
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Comments

David Brownell March 21, 2009, 9:14 a.m. UTC | #1
On Friday 20 March 2009, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

cc'd maintainer



> 
> --- a/drivers/net/usb/dm9601.c	2009-03-20 12:11:35.703901588 -0700
> +++ b/drivers/net/usb/dm9601.c	2009-03-20 12:16:05.744902076 -0700
> @@ -419,6 +419,18 @@ static int dm9601_set_mac_address(struct
>  	return 0;
>  }
>  
> +static const struct net_device_ops dm9601_netdev_ops = {
> +	.ndo_open		= usbnet_open,
> +	.ndo_stop		= usbnet_stop,
> +	.ndo_start_xmit		= usbnet_start_xmit,
> +	.ndo_tx_timeout		= usbnet_tx_timeout,
> +	.ndo_change_mtu		= usbnet_change_mtu,
> +	.ndo_validate_addr	= eth_validate_addr,
> +	.ndo_do_ioctl 		= dm9601_ioctl,
> +	.ndo_set_multicast_list = dm9601_set_multicast,
> +	.ndo_set_mac_address	= dm9601_set_mac_address,
> +};
> +
>  static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
>  {
>  	int ret;
> @@ -428,9 +440,7 @@ static int dm9601_bind(struct usbnet *de
>  	if (ret)
>  		goto out;
>  
> -	dev->net->do_ioctl = dm9601_ioctl;
> -	dev->net->set_multicast_list = dm9601_set_multicast;
> -	dev->net->set_mac_address = dm9601_set_mac_address;
> +	dev->net->netdev_ops = &dm9601_netdev_ops;
>  	dev->net->ethtool_ops = &dm9601_ethtool_ops;
>  	dev->net->hard_header_len += DM_TX_OVERHEAD;
>  	dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
> 
> -- 
> 
> 


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Peter Korsgaard March 21, 2009, 10:57 a.m. UTC | #2
>>>>> "David" == David Brownell <david-b@pacbell.net> writes:

 David> On Friday 20 March 2009, Stephen Hemminger wrote:
 >> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

 David> cc'd maintainer

Seems fine.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Peter Korsgaard March 21, 2009, 11:28 a.m. UTC | #3
>>>>> "Peter" == Peter Korsgaard <jacmet@sunsite.dk> writes:

>>>>> "David" == David Brownell <david-b@pacbell.net> writes:
 David> On Friday 20 March 2009, Stephen Hemminger wrote:
 >>> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

 David> cc'd maintainer

 Peter> Seems fine.

 Peter> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

Ehhm, I meant Acked-by: Peter Korsgaard <jacmet@sunsite.dk> ofcourse.
David Miller March 22, 2009, 3 a.m. UTC | #4
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:56 -0700

> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

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

Patch

--- a/drivers/net/usb/dm9601.c	2009-03-20 12:11:35.703901588 -0700
+++ b/drivers/net/usb/dm9601.c	2009-03-20 12:16:05.744902076 -0700
@@ -419,6 +419,18 @@  static int dm9601_set_mac_address(struct
 	return 0;
 }
 
+static const struct net_device_ops dm9601_netdev_ops = {
+	.ndo_open		= usbnet_open,
+	.ndo_stop		= usbnet_stop,
+	.ndo_start_xmit		= usbnet_start_xmit,
+	.ndo_tx_timeout		= usbnet_tx_timeout,
+	.ndo_change_mtu		= usbnet_change_mtu,
+	.ndo_validate_addr	= eth_validate_addr,
+	.ndo_do_ioctl 		= dm9601_ioctl,
+	.ndo_set_multicast_list = dm9601_set_multicast,
+	.ndo_set_mac_address	= dm9601_set_mac_address,
+};
+
 static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
 {
 	int ret;
@@ -428,9 +440,7 @@  static int dm9601_bind(struct usbnet *de
 	if (ret)
 		goto out;
 
-	dev->net->do_ioctl = dm9601_ioctl;
-	dev->net->set_multicast_list = dm9601_set_multicast;
-	dev->net->set_mac_address = dm9601_set_mac_address;
+	dev->net->netdev_ops = &dm9601_netdev_ops;
 	dev->net->ethtool_ops = &dm9601_ethtool_ops;
 	dev->net->hard_header_len += DM_TX_OVERHEAD;
 	dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;