Commit 9e0ac841 authored by Alexander Beregalov's avatar Alexander Beregalov Committed by David S. Miller

pasemi_mac: convert to net_device_ops

Signed-off-by: default avatarAlexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cd732de2
...@@ -1735,6 +1735,19 @@ static int pasemi_mac_change_mtu(struct net_device *dev, int new_mtu) ...@@ -1735,6 +1735,19 @@ static int pasemi_mac_change_mtu(struct net_device *dev, int new_mtu)
return ret; return ret;
} }
static const struct net_device_ops pasemi_netdev_ops = {
.ndo_open = pasemi_mac_open,
.ndo_stop = pasemi_mac_close,
.ndo_start_xmit = pasemi_mac_start_tx,
.ndo_set_multicast_list = pasemi_mac_set_rx_mode,
.ndo_set_mac_address = pasemi_mac_set_mac_addr,
.ndo_change_mtu = pasemi_mac_change_mtu,
.ndo_validate_addr = eth_validate_addr,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = pasemi_mac_netpoll,
#endif
};
static int __devinit static int __devinit
pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent) pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{ {
...@@ -1817,19 +1830,11 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1817,19 +1830,11 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto out; goto out;
} }
dev->open = pasemi_mac_open; dev->netdev_ops = &pasemi_netdev_ops;
dev->stop = pasemi_mac_close;
dev->hard_start_xmit = pasemi_mac_start_tx;
dev->set_multicast_list = pasemi_mac_set_rx_mode;
dev->set_mac_address = pasemi_mac_set_mac_addr;
dev->mtu = PE_DEF_MTU; dev->mtu = PE_DEF_MTU;
/* 1500 MTU + ETH_HLEN + VLAN_HLEN + 2 64B cachelines */ /* 1500 MTU + ETH_HLEN + VLAN_HLEN + 2 64B cachelines */
mac->bufsz = dev->mtu + ETH_HLEN + ETH_FCS_LEN + LOCAL_SKB_ALIGN + 128; mac->bufsz = dev->mtu + ETH_HLEN + ETH_FCS_LEN + LOCAL_SKB_ALIGN + 128;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = pasemi_mac_netpoll;
#endif
dev->change_mtu = pasemi_mac_change_mtu;
dev->ethtool_ops = &pasemi_mac_ethtool_ops; dev->ethtool_ops = &pasemi_mac_ethtool_ops;
if (err) if (err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment