aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-03-20 19:35:57 +0000
committerDavid S. Miller <davem@davemloft.net>2009-03-21 19:55:33 -0700
commite12c4f83210b457e2969fbe1198357e66f044a93 (patch)
tree57d66358c6d465f81b5dfbcfe7cbe6fd8230ab28
parentfe85ff8299538c8488645e7d72539079dad5bae6 (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>
-rw-r--r--drivers/net/usb/mcs7830.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c
index ced8f36ebd0..7ae9afe99a4 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)
return 0;
}
+static const struct net_device_ops mcs7830_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 = mcs7830_ioctl,
+ .ndo_set_multicast_list = mcs7830_set_multicast,
+ .ndo_set_mac_address = mcs7830_set_mac_address,
+};
+
static int mcs7830_bind(struct usbnet *dev, struct usb_interface *udev)
{
struct net_device *net = dev->net;
@@ -495,11 +507,9 @@ static int mcs7830_bind(struct usbnet *dev, struct usb_interface *udev)
if (ret)
goto out;
- net->do_ioctl = mcs7830_ioctl;
net->ethtool_ops = &mcs7830_ethtool_ops;
- net->set_multicast_list = mcs7830_set_multicast;
+ net->netdev_ops = &mcs7830_netdev_ops;
mcs7830_set_multicast(net);
- net->set_mac_address = mcs7830_set_mac_address;
/* reserve space for the status byte on rx */
dev->rx_urb_size = ETH_FRAME_LEN + 1;