aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/8139cp.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-19 22:09:07 -0800
committerDavid S. Miller <davem@davemloft.net>2008-11-19 22:42:46 -0800
commit48dfcde46ef23cfad1e0c0f13d4eae15c7f46efc (patch)
tree728264d7bbc3cbd92eab271b17979151fdc3fa7f /drivers/net/8139cp.c
parent8b4ab28dae8afa14f22d210c591046def2f4d742 (diff)
downloadkernel_samsung_smdk4412-48dfcde46ef23cfad1e0c0f13d4eae15c7f46efc.zip
kernel_samsung_smdk4412-48dfcde46ef23cfad1e0c0f13d4eae15c7f46efc.tar.gz
kernel_samsung_smdk4412-48dfcde46ef23cfad1e0c0f13d4eae15c7f46efc.tar.bz2
8139: convert to net_device_ops
Convert to new network device ops interface. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/8139cp.c')
-rw-r--r--drivers/net/8139cp.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index 664bd73..13f75b6 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -1817,6 +1817,25 @@ static void cp_set_d3_state (struct cp_private *cp)
pci_set_power_state (cp->pdev, PCI_D3hot);
}
+static const struct net_device_ops cp_netdev_ops = {
+ .ndo_open = cp_open,
+ .ndo_stop = cp_close,
+ .ndo_validate_addr = eth_validate_addr,
+ .ndo_set_multicast_list = cp_set_rx_mode,
+ .ndo_get_stats = cp_get_stats,
+ .ndo_do_ioctl = cp_ioctl,
+ .ndo_tx_timeout = cp_tx_timeout,
+#if CP_VLAN_TAG_USED
+ .ndo_vlan_rx_register = cp_vlan_rx_register,
+#endif
+#ifdef BROKEN
+ .ndo_change_mtu = cp_change_mtu,
+#endif
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = cp_poll_controller,
+#endif
+};
+
static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *dev;
@@ -1929,26 +1948,14 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
cpu_to_le16(read_eeprom (regs, i + 7, addr_len));
memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
- dev->open = cp_open;
- dev->stop = cp_close;
- dev->set_multicast_list = cp_set_rx_mode;
+ dev->netdev_ops = &cp_netdev_ops;
dev->hard_start_xmit = cp_start_xmit;
- dev->get_stats = cp_get_stats;
- dev->do_ioctl = cp_ioctl;
-#ifdef CONFIG_NET_POLL_CONTROLLER
- dev->poll_controller = cp_poll_controller;
-#endif
netif_napi_add(dev, &cp->napi, cp_rx_poll, 16);
-#ifdef BROKEN
- dev->change_mtu = cp_change_mtu;
-#endif
dev->ethtool_ops = &cp_ethtool_ops;
- dev->tx_timeout = cp_tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT;
#if CP_VLAN_TAG_USED
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
- dev->vlan_rx_register = cp_vlan_rx_register;
#endif
if (pci_using_dac)