diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-20 01:15:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 01:42:49 -0500 |
commit | dd7526960ec2a7c85a5b8bfae8f297d317bf4b86 (patch) | |
tree | 647077cd404e6e532147d069a024f041631c8891 /drivers/net/cxgb3 | |
parent | 825a84d1d3d612c2b8db77dd4719882690d01bae (diff) |
cxgb3: convert to net_device_ops
Convert this driver to network 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/cxgb3')
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index b6b2a46b7d0e..a9479be53ec3 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -2828,6 +2828,21 @@ static void __devinit print_port_info(struct adapter *adap, | |||
2828 | } | 2828 | } |
2829 | } | 2829 | } |
2830 | 2830 | ||
2831 | static const struct net_device_ops cxgb_netdev_ops = { | ||
2832 | .ndo_open = cxgb_open, | ||
2833 | .ndo_stop = cxgb_close, | ||
2834 | .ndo_get_stats = cxgb_get_stats, | ||
2835 | .ndo_validate_addr = eth_validate_addr, | ||
2836 | .ndo_set_multicast_list = cxgb_set_rxmode, | ||
2837 | .ndo_do_ioctl = cxgb_ioctl, | ||
2838 | .ndo_change_mtu = cxgb_change_mtu, | ||
2839 | .ndo_set_mac_address = cxgb_set_mac_addr, | ||
2840 | .ndo_vlan_rx_register = vlan_rx_register, | ||
2841 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
2842 | .ndo_poll_controller = cxgb_netpoll, | ||
2843 | #endif | ||
2844 | }; | ||
2845 | |||
2831 | static int __devinit init_one(struct pci_dev *pdev, | 2846 | static int __devinit init_one(struct pci_dev *pdev, |
2832 | const struct pci_device_id *ent) | 2847 | const struct pci_device_id *ent) |
2833 | { | 2848 | { |
@@ -2939,20 +2954,8 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
2939 | netdev->features |= NETIF_F_HIGHDMA; | 2954 | netdev->features |= NETIF_F_HIGHDMA; |
2940 | 2955 | ||
2941 | netdev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 2956 | netdev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
2942 | netdev->vlan_rx_register = vlan_rx_register; | 2957 | netdev->netdev_ops = &cxgb_netdev_ops; |
2943 | |||
2944 | netdev->open = cxgb_open; | ||
2945 | netdev->stop = cxgb_close; | ||
2946 | netdev->hard_start_xmit = t3_eth_xmit; | 2958 | netdev->hard_start_xmit = t3_eth_xmit; |
2947 | netdev->get_stats = cxgb_get_stats; | ||
2948 | netdev->set_multicast_list = cxgb_set_rxmode; | ||
2949 | netdev->do_ioctl = cxgb_ioctl; | ||
2950 | netdev->change_mtu = cxgb_change_mtu; | ||
2951 | netdev->set_mac_address = cxgb_set_mac_addr; | ||
2952 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
2953 | netdev->poll_controller = cxgb_netpoll; | ||
2954 | #endif | ||
2955 | |||
2956 | SET_ETHTOOL_OPS(netdev, &cxgb_ethtool_ops); | 2959 | SET_ETHTOOL_OPS(netdev, &cxgb_ethtool_ops); |
2957 | } | 2960 | } |
2958 | 2961 | ||