Commit fe85ff82 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

usbnet: convert dms9601 driver to net_device_ops

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1703338c
...@@ -419,6 +419,18 @@ static int dm9601_set_mac_address(struct net_device *net, void *p) ...@@ -419,6 +419,18 @@ static int dm9601_set_mac_address(struct net_device *net, void *p)
return 0; 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) static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
{ {
int ret; int ret;
...@@ -428,9 +440,7 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) ...@@ -428,9 +440,7 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
if (ret) if (ret)
goto out; goto out;
dev->net->do_ioctl = dm9601_ioctl; dev->net->netdev_ops = &dm9601_netdev_ops;
dev->net->set_multicast_list = dm9601_set_multicast;
dev->net->set_mac_address = dm9601_set_mac_address;
dev->net->ethtool_ops = &dm9601_ethtool_ops; dev->net->ethtool_ops = &dm9601_ethtool_ops;
dev->net->hard_header_len += DM_TX_OVERHEAD; dev->net->hard_header_len += DM_TX_OVERHEAD;
dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment