diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-03-20 15:35:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-21 22:55:33 -0400 |
commit | e12c4f83210b457e2969fbe1198357e66f044a93 (patch) | |
tree | 57d66358c6d465f81b5dfbcfe7cbe6fd8230ab28 /drivers/net/usb | |
parent | fe85ff8299538c8488645e7d72539079dad5bae6 (diff) |
usbnet: convert msc7830 driver to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/mcs7830.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c index ced8f36ebd01..7ae9afe99a4f 100644 --- a/drivers/net/usb/mcs7830.c +++ b/drivers/net/usb/mcs7830.c | |||
@@ -486,6 +486,18 @@ static int mcs7830_set_mac_address(struct net_device *netdev, void *p) | |||
486 | return 0; | 486 | return 0; |
487 | } | 487 | } |
488 | 488 | ||
489 | static const struct net_device_ops mcs7830_netdev_ops = { | ||
490 | .ndo_open = usbnet_open, | ||
491 | .ndo_stop = usbnet_stop, | ||
492 | .ndo_start_xmit = usbnet_start_xmit, | ||
493 | .ndo_tx_timeout = usbnet_tx_timeout, | ||
494 | .ndo_change_mtu = usbnet_change_mtu, | ||
495 | .ndo_validate_addr = eth_validate_addr, | ||
496 | .ndo_do_ioctl = mcs7830_ioctl, | ||
497 | .ndo_set_multicast_list = mcs7830_set_multicast, | ||
498 | .ndo_set_mac_address = mcs7830_set_mac_address, | ||
499 | }; | ||
500 | |||
489 | static int mcs7830_bind(struct usbnet *dev, struct usb_interface *udev) | 501 | static int mcs7830_bind(struct usbnet *dev, struct usb_interface *udev) |
490 | { | 502 | { |
491 | struct net_device *net = dev->net; | 503 | struct net_device *net = dev->net; |
@@ -495,11 +507,9 @@ static int mcs7830_bind(struct usbnet *dev, struct usb_interface *udev) | |||
495 | if (ret) | 507 | if (ret) |
496 | goto out; | 508 | goto out; |
497 | 509 | ||
498 | net->do_ioctl = mcs7830_ioctl; | ||
499 | net->ethtool_ops = &mcs7830_ethtool_ops; | 510 | net->ethtool_ops = &mcs7830_ethtool_ops; |
500 | net->set_multicast_list = mcs7830_set_multicast; | 511 | net->netdev_ops = &mcs7830_netdev_ops; |
501 | mcs7830_set_multicast(net); | 512 | mcs7830_set_multicast(net); |
502 | net->set_mac_address = mcs7830_set_mac_address; | ||
503 | 513 | ||
504 | /* reserve space for the status byte on rx */ | 514 | /* reserve space for the status byte on rx */ |
505 | dev->rx_urb_size = ETH_FRAME_LEN + 1; | 515 | dev->rx_urb_size = ETH_FRAME_LEN + 1; |