diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-03-20 15:35:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-21 22:55:33 -0400 |
commit | fe85ff8299538c8488645e7d72539079dad5bae6 (patch) | |
tree | a79ce6408262f2897f5518773b2ef7da49ecc020 /drivers/net/usb | |
parent | 1703338c79f39178535fe54b5aeaebf9c42300f6 (diff) |
usbnet: convert dms9601 driver to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/dm9601.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index 81682c6defa0..6fc4f82b0beb 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c | |||
@@ -419,6 +419,18 @@ static int dm9601_set_mac_address(struct net_device *net, void *p) | |||
419 | return 0; | 419 | return 0; |
420 | } | 420 | } |
421 | 421 | ||
422 | static const struct net_device_ops dm9601_netdev_ops = { | ||
423 | .ndo_open = usbnet_open, | ||
424 | .ndo_stop = usbnet_stop, | ||
425 | .ndo_start_xmit = usbnet_start_xmit, | ||
426 | .ndo_tx_timeout = usbnet_tx_timeout, | ||
427 | .ndo_change_mtu = usbnet_change_mtu, | ||
428 | .ndo_validate_addr = eth_validate_addr, | ||
429 | .ndo_do_ioctl = dm9601_ioctl, | ||
430 | .ndo_set_multicast_list = dm9601_set_multicast, | ||
431 | .ndo_set_mac_address = dm9601_set_mac_address, | ||
432 | }; | ||
433 | |||
422 | static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) | 434 | static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) |
423 | { | 435 | { |
424 | int ret; | 436 | int ret; |
@@ -428,9 +440,7 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) | |||
428 | if (ret) | 440 | if (ret) |
429 | goto out; | 441 | goto out; |
430 | 442 | ||
431 | dev->net->do_ioctl = dm9601_ioctl; | 443 | dev->net->netdev_ops = &dm9601_netdev_ops; |
432 | dev->net->set_multicast_list = dm9601_set_multicast; | ||
433 | dev->net->set_mac_address = dm9601_set_mac_address; | ||
434 | dev->net->ethtool_ops = &dm9601_ethtool_ops; | 444 | dev->net->ethtool_ops = &dm9601_ethtool_ops; |
435 | dev->net->hard_header_len += DM_TX_OVERHEAD; | 445 | dev->net->hard_header_len += DM_TX_OVERHEAD; |
436 | dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; | 446 | dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; |