aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-21 20:34:56 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-21 20:34:56 -0500
commita7bd89cbb1aa8342617c2f8a6dc0595e5f553115 (patch)
tree73c01c0caf16c8274fcb9c2b8ede06d39a128efc /drivers/net
parent09ab9e7cddf0f10afd4695d098120d63183c74d1 (diff)
r6040: convert to net_device_ops
Convert driver to new net_device_ops. Compile tested only. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/r6040.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index d9a6e920fd62..281080d579e1 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -1029,13 +1029,28 @@ static u32 netdev_get_link(struct net_device *dev)
1029 return mii_link_ok(&rp->mii_if); 1029 return mii_link_ok(&rp->mii_if);
1030} 1030}
1031 1031
1032static struct ethtool_ops netdev_ethtool_ops = { 1032static const struct ethtool_ops netdev_ethtool_ops = {
1033 .get_drvinfo = netdev_get_drvinfo, 1033 .get_drvinfo = netdev_get_drvinfo,
1034 .get_settings = netdev_get_settings, 1034 .get_settings = netdev_get_settings,
1035 .set_settings = netdev_set_settings, 1035 .set_settings = netdev_set_settings,
1036 .get_link = netdev_get_link, 1036 .get_link = netdev_get_link,
1037}; 1037};
1038 1038
1039static const struct net_device_ops r6040_netdev_ops = {
1040 .ndo_open = r6040_open,
1041 .ndo_stop = r6040_close,
1042 .ndo_start_xmit = r6040_start_xmit,
1043 .ndo_get_stats = r6040_get_stats,
1044 .ndo_set_multicast_list = r6040_multicast_list,
1045 .ndo_change_mtu = eth_change_mtu,
1046 .ndo_validate_addr = eth_validate_addr,
1047 .ndo_do_ioctl = r6040_ioctl,
1048 .ndo_tx_timeout = r6040_tx_timeout,
1049#ifdef CONFIG_NET_POLL_CONTROLLER
1050 .ndo_poll_controller = r6040_poll_controller,
1051#endif
1052};
1053
1039static int __devinit r6040_init_one(struct pci_dev *pdev, 1054static int __devinit r6040_init_one(struct pci_dev *pdev,
1040 const struct pci_device_id *ent) 1055 const struct pci_device_id *ent)
1041{ 1056{
@@ -1127,18 +1142,10 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
1127 lp->switch_sig = 0; 1142 lp->switch_sig = 0;
1128 1143
1129 /* The RDC-specific entries in the device structure. */ 1144 /* The RDC-specific entries in the device structure. */
1130 dev->open = &r6040_open; 1145 dev->netdev_ops = &r6040_netdev_ops;
1131 dev->hard_start_xmit = &r6040_start_xmit;
1132 dev->stop = &r6040_close;
1133 dev->get_stats = r6040_get_stats;
1134 dev->set_multicast_list = &r6040_multicast_list;
1135 dev->do_ioctl = &r6040_ioctl;
1136 dev->ethtool_ops = &netdev_ethtool_ops; 1146 dev->ethtool_ops = &netdev_ethtool_ops;
1137 dev->tx_timeout = &r6040_tx_timeout;
1138 dev->watchdog_timeo = TX_TIMEOUT; 1147 dev->watchdog_timeo = TX_TIMEOUT;
1139#ifdef CONFIG_NET_POLL_CONTROLLER 1148
1140 dev->poll_controller = r6040_poll_controller;
1141#endif
1142 netif_napi_add(dev, &lp->napi, r6040_poll, 64); 1149 netif_napi_add(dev, &lp->napi, r6040_poll, 64);
1143 lp->mii_if.dev = dev; 1150 lp->mii_if.dev = dev;
1144 lp->mii_if.mdio_read = r6040_mdio_read; 1151 lp->mii_if.mdio_read = r6040_mdio_read;