aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/u_ether.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-01-07 21:05:39 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-07 21:05:39 -0500
commit5ec38f3023217fc164763d2a5505dee806d84223 (patch)
tree28c12e34af78c93009a8f5dc99abc64af3ebc125 /drivers/usb/gadget/u_ether.c
parente8ac9c55f28482f5b2f497a8e7eb90985db237c2 (diff)
gadget: convert devices to new API
Convert 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/usb/gadget/u_ether.c')
-rw-r--r--drivers/usb/gadget/u_ether.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c
index d9739d52f8f5..96d65ca06ecd 100644
--- a/drivers/usb/gadget/u_ether.c
+++ b/drivers/usb/gadget/u_ether.c
@@ -716,6 +716,14 @@ static int __init get_ether_addr(const char *str, u8 *dev_addr)
716 716
717static struct eth_dev *the_dev; 717static struct eth_dev *the_dev;
718 718
719static const struct net_device_ops eth_netdev_ops = {
720 .ndo_open = eth_open,
721 .ndo_stop = eth_stop,
722 .ndo_start_xmit = eth_start_xmit,
723 .ndo_change_mtu = ueth_change_mtu,
724 .ndo_set_mac_address = eth_mac_addr,
725 .ndo_validate_addr = eth_validate_addr,
726};
719 727
720/** 728/**
721 * gether_setup - initialize one ethernet-over-usb link 729 * gether_setup - initialize one ethernet-over-usb link
@@ -764,12 +772,8 @@ int __init gether_setup(struct usb_gadget *g, u8 ethaddr[ETH_ALEN])
764 if (ethaddr) 772 if (ethaddr)
765 memcpy(ethaddr, dev->host_mac, ETH_ALEN); 773 memcpy(ethaddr, dev->host_mac, ETH_ALEN);
766 774
767 net->change_mtu = ueth_change_mtu; 775 net->netdev_ops = &eth_netdev_ops;
768 net->hard_start_xmit = eth_start_xmit; 776
769 net->open = eth_open;
770 net->stop = eth_stop;
771 /* watchdog_timeo, tx_timeout ... */
772 /* set_multicast_list */
773 SET_ETHTOOL_OPS(net, &ops); 777 SET_ETHTOOL_OPS(net, &ops);
774 778
775 /* two kinds of host-initiated state changes: 779 /* two kinds of host-initiated state changes: