diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-21 20:36:04 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-21 20:36:04 -0500 |
commit | c64213cd138cf9815839f7278b5eee89d31fbacb (patch) | |
tree | ab98333e548c9a65a9d599c474178aef7bd1933d /drivers | |
parent | 6557d7b8599c22819d16497ab6dcc33f2f3027a4 (diff) |
bnx2x: 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')
-rw-r--r-- | drivers/net/bnx2x_main.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 49f8e7891626..a9c4de0d2020 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -10002,6 +10002,25 @@ static void poll_bnx2x(struct net_device *dev) | |||
10002 | } | 10002 | } |
10003 | #endif | 10003 | #endif |
10004 | 10004 | ||
10005 | static const struct net_device_ops bnx2x_netdev_ops = { | ||
10006 | .ndo_open = bnx2x_open, | ||
10007 | .ndo_stop = bnx2x_close, | ||
10008 | .ndo_start_xmit = bnx2x_start_xmit, | ||
10009 | .ndo_set_multicast_list = bnx2x_set_rx_mode, | ||
10010 | .ndo_set_mac_address = bnx2x_change_mac_addr, | ||
10011 | .ndo_validate_addr = eth_validate_addr, | ||
10012 | .ndo_do_ioctl = bnx2x_ioctl, | ||
10013 | .ndo_change_mtu = bnx2x_change_mtu, | ||
10014 | .ndo_tx_timeout = bnx2x_tx_timeout, | ||
10015 | #ifdef BCM_VLAN | ||
10016 | .ndo_vlan_rx_register = bnx2x_vlan_rx_register, | ||
10017 | #endif | ||
10018 | #if defined(HAVE_POLL_CONTROLLER) || defined(CONFIG_NET_POLL_CONTROLLER) | ||
10019 | .ndo_poll_controller = poll_bnx2x, | ||
10020 | #endif | ||
10021 | }; | ||
10022 | |||
10023 | |||
10005 | static int __devinit bnx2x_init_dev(struct pci_dev *pdev, | 10024 | static int __devinit bnx2x_init_dev(struct pci_dev *pdev, |
10006 | struct net_device *dev) | 10025 | struct net_device *dev) |
10007 | { | 10026 | { |
@@ -10112,23 +10131,10 @@ static int __devinit bnx2x_init_dev(struct pci_dev *pdev, | |||
10112 | REG_WR(bp, PXP2_REG_PGL_ADDR_90_F0 + BP_PORT(bp)*16, 0); | 10131 | REG_WR(bp, PXP2_REG_PGL_ADDR_90_F0 + BP_PORT(bp)*16, 0); |
10113 | REG_WR(bp, PXP2_REG_PGL_ADDR_94_F0 + BP_PORT(bp)*16, 0); | 10132 | REG_WR(bp, PXP2_REG_PGL_ADDR_94_F0 + BP_PORT(bp)*16, 0); |
10114 | 10133 | ||
10115 | dev->hard_start_xmit = bnx2x_start_xmit; | ||
10116 | dev->watchdog_timeo = TX_TIMEOUT; | 10134 | dev->watchdog_timeo = TX_TIMEOUT; |
10117 | 10135 | ||
10136 | dev->netdev_ops = &bnx2x_netdev_ops; | ||
10118 | dev->ethtool_ops = &bnx2x_ethtool_ops; | 10137 | dev->ethtool_ops = &bnx2x_ethtool_ops; |
10119 | dev->open = bnx2x_open; | ||
10120 | dev->stop = bnx2x_close; | ||
10121 | dev->set_multicast_list = bnx2x_set_rx_mode; | ||
10122 | dev->set_mac_address = bnx2x_change_mac_addr; | ||
10123 | dev->do_ioctl = bnx2x_ioctl; | ||
10124 | dev->change_mtu = bnx2x_change_mtu; | ||
10125 | dev->tx_timeout = bnx2x_tx_timeout; | ||
10126 | #ifdef BCM_VLAN | ||
10127 | dev->vlan_rx_register = bnx2x_vlan_rx_register; | ||
10128 | #endif | ||
10129 | #if defined(HAVE_POLL_CONTROLLER) || defined(CONFIG_NET_POLL_CONTROLLER) | ||
10130 | dev->poll_controller = poll_bnx2x; | ||
10131 | #endif | ||
10132 | dev->features |= NETIF_F_SG; | 10138 | dev->features |= NETIF_F_SG; |
10133 | dev->features |= NETIF_F_HW_CSUM; | 10139 | dev->features |= NETIF_F_HW_CSUM; |
10134 | if (bp->flags & USING_DAC_FLAG) | 10140 | if (bp->flags & USING_DAC_FLAG) |