diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-04-11 03:42:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-13 18:16:27 -0400 |
commit | 5f1fa992382cf8bb82002aaf19fa03bf67330254 (patch) | |
tree | cf9d500daf51d09bfe15fda5ecb8b89976a9a3c0 /drivers/net/macb.c | |
parent | c6e6d8525c415736d961a15c449d8c98cb7562d4 (diff) |
macb: convert to net_device_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macb.c')
-rw-r--r-- | drivers/net/macb.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index f50501013b1c..46073de290cf 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c | |||
@@ -1100,6 +1100,18 @@ static int macb_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
1100 | return phy_mii_ioctl(phydev, if_mii(rq), cmd); | 1100 | return phy_mii_ioctl(phydev, if_mii(rq), cmd); |
1101 | } | 1101 | } |
1102 | 1102 | ||
1103 | static const struct net_device_ops macb_netdev_ops = { | ||
1104 | .ndo_open = macb_open, | ||
1105 | .ndo_stop = macb_close, | ||
1106 | .ndo_start_xmit = macb_start_xmit, | ||
1107 | .ndo_set_multicast_list = macb_set_rx_mode, | ||
1108 | .ndo_get_stats = macb_get_stats, | ||
1109 | .ndo_do_ioctl = macb_ioctl, | ||
1110 | .ndo_validate_addr = eth_validate_addr, | ||
1111 | .ndo_change_mtu = eth_change_mtu, | ||
1112 | .ndo_set_mac_address = eth_mac_addr, | ||
1113 | }; | ||
1114 | |||
1103 | static int __init macb_probe(struct platform_device *pdev) | 1115 | static int __init macb_probe(struct platform_device *pdev) |
1104 | { | 1116 | { |
1105 | struct eth_platform_data *pdata; | 1117 | struct eth_platform_data *pdata; |
@@ -1175,12 +1187,7 @@ static int __init macb_probe(struct platform_device *pdev) | |||
1175 | goto err_out_iounmap; | 1187 | goto err_out_iounmap; |
1176 | } | 1188 | } |
1177 | 1189 | ||
1178 | dev->open = macb_open; | 1190 | dev->netdev_ops = &macb_netdev_ops; |
1179 | dev->stop = macb_close; | ||
1180 | dev->hard_start_xmit = macb_start_xmit; | ||
1181 | dev->get_stats = macb_get_stats; | ||
1182 | dev->set_multicast_list = macb_set_rx_mode; | ||
1183 | dev->do_ioctl = macb_ioctl; | ||
1184 | netif_napi_add(dev, &bp->napi, macb_poll, 64); | 1191 | netif_napi_add(dev, &bp->napi, macb_poll, 64); |
1185 | dev->ethtool_ops = &macb_ethtool_ops; | 1192 | dev->ethtool_ops = &macb_ethtool_ops; |
1186 | 1193 | ||