Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bnx2: 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>

authored by

Stephen Hemminger and committed by
David S. Miller
0421eae6 3addc568

+20 -16
+20 -16
drivers/net/bnx2.c
··· 7707 7707 } 7708 7708 } 7709 7709 7710 + static const struct net_device_ops bnx2_netdev_ops = { 7711 + .ndo_open = bnx2_open, 7712 + .ndo_start_xmit = bnx2_start_xmit, 7713 + .ndo_stop = bnx2_close, 7714 + .ndo_get_stats = bnx2_get_stats, 7715 + .ndo_set_rx_mode = bnx2_set_rx_mode, 7716 + .ndo_do_ioctl = bnx2_ioctl, 7717 + .ndo_validate_addr = eth_validate_addr, 7718 + .ndo_set_mac_address = bnx2_change_mac_addr, 7719 + .ndo_change_mtu = bnx2_change_mtu, 7720 + .ndo_tx_timeout = bnx2_tx_timeout, 7721 + #ifdef BCM_VLAN 7722 + .ndo_vlan_rx_register = bnx2_vlan_rx_register, 7723 + #endif 7724 + #if defined(HAVE_POLL_CONTROLLER) || defined(CONFIG_NET_POLL_CONTROLLER) 7725 + .ndo_poll_controller = poll_bnx2, 7726 + #endif 7727 + }; 7728 + 7710 7729 static int __devinit 7711 7730 bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) 7712 7731 { ··· 7750 7731 return rc; 7751 7732 } 7752 7733 7753 - dev->open = bnx2_open; 7754 - dev->hard_start_xmit = bnx2_start_xmit; 7755 - dev->stop = bnx2_close; 7756 - dev->get_stats = bnx2_get_stats; 7757 - dev->set_rx_mode = bnx2_set_rx_mode; 7758 - dev->do_ioctl = bnx2_ioctl; 7759 - dev->set_mac_address = bnx2_change_mac_addr; 7760 - dev->change_mtu = bnx2_change_mtu; 7761 - dev->tx_timeout = bnx2_tx_timeout; 7734 + dev->netdev_ops = &bnx2_netdev_ops; 7762 7735 dev->watchdog_timeo = TX_TIMEOUT; 7763 - #ifdef BCM_VLAN 7764 - dev->vlan_rx_register = bnx2_vlan_rx_register; 7765 - #endif 7766 7736 dev->ethtool_ops = &bnx2_ethtool_ops; 7767 7737 7768 7738 bp = netdev_priv(dev); 7769 7739 bnx2_init_napi(bp); 7770 - 7771 - #if defined(HAVE_POLL_CONTROLLER) || defined(CONFIG_NET_POLL_CONTROLLER) 7772 - dev->poll_controller = poll_bnx2; 7773 - #endif 7774 7740 7775 7741 pci_set_drvdata(pdev, dev); 7776 7742