aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/niu.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-20 01:27:43 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-20 01:42:58 -0500
commit2c9171d4ef431d8ed897daf4fee6798979cbb432 (patch)
tree5be680e6464c371cd6c0f7342010f36c45c1e06e /drivers/net/niu.c
parentb94426bd9d16fb2753ada1255c7a432f49dfebcb (diff)
niu: convert to net_device_ops
Convert this driver to network device ops. Compile tested only (give me hw!) Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/niu.c')
-rw-r--r--drivers/net/niu.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 5ddca4e3d27b..318537efd583 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -8889,19 +8889,24 @@ static struct net_device * __devinit niu_alloc_and_init(
8889 return dev; 8889 return dev;
8890} 8890}
8891 8891
8892static const struct net_device_ops niu_netdev_ops = {
8893 .ndo_open = niu_open,
8894 .ndo_stop = niu_close,
8895 .ndo_get_stats = niu_get_stats,
8896 .ndo_set_multicast_list = niu_set_rx_mode,
8897 .ndo_validate_addr = eth_validate_addr,
8898 .ndo_set_mac_address = niu_set_mac_addr,
8899 .ndo_do_ioctl = niu_ioctl,
8900 .ndo_tx_timeout = niu_tx_timeout,
8901 .ndo_change_mtu = niu_change_mtu,
8902};
8903
8892static void __devinit niu_assign_netdev_ops(struct net_device *dev) 8904static void __devinit niu_assign_netdev_ops(struct net_device *dev)
8893{ 8905{
8894 dev->open = niu_open; 8906 dev->netdev_ops = &niu_netdev_ops;
8895 dev->stop = niu_close;
8896 dev->get_stats = niu_get_stats;
8897 dev->set_multicast_list = niu_set_rx_mode;
8898 dev->set_mac_address = niu_set_mac_addr;
8899 dev->do_ioctl = niu_ioctl;
8900 dev->tx_timeout = niu_tx_timeout;
8901 dev->hard_start_xmit = niu_start_xmit; 8907 dev->hard_start_xmit = niu_start_xmit;
8902 dev->ethtool_ops = &niu_ethtool_ops; 8908 dev->ethtool_ops = &niu_ethtool_ops;
8903 dev->watchdog_timeo = NIU_TX_TIMEOUT; 8909 dev->watchdog_timeo = NIU_TX_TIMEOUT;
8904 dev->change_mtu = niu_change_mtu;
8905} 8910}
8906 8911
8907static void __devinit niu_device_announce(struct niu *np) 8912static void __devinit niu_device_announce(struct niu *np)