diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-04-15 08:52:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-16 05:20:22 -0400 |
commit | 9e0ac841f42df4e7acdab7dc1620de0933ed56d7 (patch) | |
tree | 93fb462acae85ea6a435d56ff8dd66dbf3ab836f | |
parent | cd732de21e3d4f0b905fdbee8abfbb8192144b3d (diff) |
pasemi_mac: convert to net_device_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/pasemi_mac.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c index 5eeb5a87b738..067caba43656 100644 --- a/drivers/net/pasemi_mac.c +++ b/drivers/net/pasemi_mac.c | |||
@@ -1735,6 +1735,19 @@ out: | |||
1735 | return ret; | 1735 | return ret; |
1736 | } | 1736 | } |
1737 | 1737 | ||
1738 | static const struct net_device_ops pasemi_netdev_ops = { | ||
1739 | .ndo_open = pasemi_mac_open, | ||
1740 | .ndo_stop = pasemi_mac_close, | ||
1741 | .ndo_start_xmit = pasemi_mac_start_tx, | ||
1742 | .ndo_set_multicast_list = pasemi_mac_set_rx_mode, | ||
1743 | .ndo_set_mac_address = pasemi_mac_set_mac_addr, | ||
1744 | .ndo_change_mtu = pasemi_mac_change_mtu, | ||
1745 | .ndo_validate_addr = eth_validate_addr, | ||
1746 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
1747 | .ndo_poll_controller = pasemi_mac_netpoll, | ||
1748 | #endif | ||
1749 | }; | ||
1750 | |||
1738 | static int __devinit | 1751 | static int __devinit |
1739 | pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 1752 | pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
1740 | { | 1753 | { |
@@ -1817,19 +1830,11 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1817 | goto out; | 1830 | goto out; |
1818 | } | 1831 | } |
1819 | 1832 | ||
1820 | dev->open = pasemi_mac_open; | 1833 | dev->netdev_ops = &pasemi_netdev_ops; |
1821 | dev->stop = pasemi_mac_close; | ||
1822 | dev->hard_start_xmit = pasemi_mac_start_tx; | ||
1823 | dev->set_multicast_list = pasemi_mac_set_rx_mode; | ||
1824 | dev->set_mac_address = pasemi_mac_set_mac_addr; | ||
1825 | dev->mtu = PE_DEF_MTU; | 1834 | dev->mtu = PE_DEF_MTU; |
1826 | /* 1500 MTU + ETH_HLEN + VLAN_HLEN + 2 64B cachelines */ | 1835 | /* 1500 MTU + ETH_HLEN + VLAN_HLEN + 2 64B cachelines */ |
1827 | mac->bufsz = dev->mtu + ETH_HLEN + ETH_FCS_LEN + LOCAL_SKB_ALIGN + 128; | 1836 | mac->bufsz = dev->mtu + ETH_HLEN + ETH_FCS_LEN + LOCAL_SKB_ALIGN + 128; |
1828 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
1829 | dev->poll_controller = pasemi_mac_netpoll; | ||
1830 | #endif | ||
1831 | 1837 | ||
1832 | dev->change_mtu = pasemi_mac_change_mtu; | ||
1833 | dev->ethtool_ops = &pasemi_mac_ethtool_ops; | 1838 | dev->ethtool_ops = &pasemi_mac_ethtool_ops; |
1834 | 1839 | ||
1835 | if (err) | 1840 | if (err) |