aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cpmac.c
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-04-15 08:52:36 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-16 05:20:07 -0400
commit63ef7d89cbecc249339a59c7a1ec58d2e8e88ea5 (patch)
treef5a0ca5f40e9cf3511b63fe524f903178fe1373c /drivers/net/cpmac.c
parent7a4762abf20531fc8d0bdbe132bc63181b8bebe8 (diff)
cpmac: 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/cpmac.c')
-rw-r--r--drivers/net/cpmac.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
index 3f476c7c0736..af305c0b34d1 100644
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -1093,6 +1093,19 @@ static int cpmac_stop(struct net_device *dev)
1093 return 0; 1093 return 0;
1094} 1094}
1095 1095
1096static const struct net_device_ops cpmac_netdev_ops = {
1097 .ndo_open = cpmac_open,
1098 .ndo_stop = cpmac_stop,
1099 .ndo_start_xmit = cpmac_start_xmit,
1100 .ndo_tx_timeout = cpmac_tx_timeout,
1101 .ndo_set_multicast_list = cpmac_set_multicast_list,
1102 .ndo_so_ioctl = cpmac_ioctl,
1103 .ndo_set_config = cpmac_config,
1104 .ndo_change_mtu = eth_change_mtu,
1105 .ndo_validate_addr = eth_validate_addr,
1106 .ndo_set_mac_address = eth_mac_addr,
1107};
1108
1096static int external_switch; 1109static int external_switch;
1097 1110
1098static int __devinit cpmac_probe(struct platform_device *pdev) 1111static int __devinit cpmac_probe(struct platform_device *pdev)
@@ -1143,14 +1156,8 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
1143 1156
1144 dev->irq = platform_get_irq_byname(pdev, "irq"); 1157 dev->irq = platform_get_irq_byname(pdev, "irq");
1145 1158
1146 dev->open = cpmac_open; 1159 dev->netdev_ops = &cpmac_netdev_ops;
1147 dev->stop = cpmac_stop; 1160 dev->ethtool_ops = &cpmac_ethtool_ops;
1148 dev->set_config = cpmac_config;
1149 dev->hard_start_xmit = cpmac_start_xmit;
1150 dev->do_ioctl = cpmac_ioctl;
1151 dev->set_multicast_list = cpmac_set_multicast_list;
1152 dev->tx_timeout = cpmac_tx_timeout;
1153 dev->ethtool_ops = &cpmac_ethtool_ops;
1154 1161
1155 netif_napi_add(dev, &priv->napi, cpmac_poll, 64); 1162 netif_napi_add(dev, &priv->napi, cpmac_poll, 64);
1156 1163