diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-21 20:29:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-21 20:29:16 -0500 |
commit | 25ed784910e43e61b5642dd8d2d8c13384a0d290 (patch) | |
tree | 548fac8590b7945bac97c182b80ca60b1f5633d2 /drivers/net/qlge | |
parent | 040250959da9b96e2fd30415e4ca15257a3460e4 (diff) |
qlge: 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/net/qlge')
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 3a6d3ac25f12..713b793f18aa 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -3715,6 +3715,22 @@ err_out: | |||
3715 | return err; | 3715 | return err; |
3716 | } | 3716 | } |
3717 | 3717 | ||
3718 | |||
3719 | static const struct net_device_ops qlge_netdev_ops = { | ||
3720 | .ndo_open = qlge_open, | ||
3721 | .ndo_stop = qlge_close, | ||
3722 | .ndo_start_xmit = qlge_send, | ||
3723 | .ndo_change_mtu = qlge_change_mtu, | ||
3724 | .ndo_get_stats = qlge_get_stats, | ||
3725 | .ndo_set_multicast_list = qlge_set_multicast_list, | ||
3726 | .ndo_set_mac_address = qlge_set_mac_address, | ||
3727 | .ndo_validate_addr = eth_validate_addr, | ||
3728 | .ndo_tx_timeout = qlge_tx_timeout, | ||
3729 | .ndo_vlan_rx_register = ql_vlan_rx_register, | ||
3730 | .ndo_vlan_rx_add_vid = ql_vlan_rx_add_vid, | ||
3731 | .ndo_vlan_rx_kill_vid = ql_vlan_rx_kill_vid, | ||
3732 | }; | ||
3733 | |||
3718 | static int __devinit qlge_probe(struct pci_dev *pdev, | 3734 | static int __devinit qlge_probe(struct pci_dev *pdev, |
3719 | const struct pci_device_id *pci_entry) | 3735 | const struct pci_device_id *pci_entry) |
3720 | { | 3736 | { |
@@ -3752,19 +3768,11 @@ static int __devinit qlge_probe(struct pci_dev *pdev, | |||
3752 | */ | 3768 | */ |
3753 | ndev->tx_queue_len = qdev->tx_ring_size; | 3769 | ndev->tx_queue_len = qdev->tx_ring_size; |
3754 | ndev->irq = pdev->irq; | 3770 | ndev->irq = pdev->irq; |
3755 | ndev->open = qlge_open; | 3771 | |
3756 | ndev->stop = qlge_close; | 3772 | ndev->netdev_ops = &qlge_netdev_ops; |
3757 | ndev->hard_start_xmit = qlge_send; | ||
3758 | SET_ETHTOOL_OPS(ndev, &qlge_ethtool_ops); | 3773 | SET_ETHTOOL_OPS(ndev, &qlge_ethtool_ops); |
3759 | ndev->change_mtu = qlge_change_mtu; | ||
3760 | ndev->get_stats = qlge_get_stats; | ||
3761 | ndev->set_multicast_list = qlge_set_multicast_list; | ||
3762 | ndev->set_mac_address = qlge_set_mac_address; | ||
3763 | ndev->tx_timeout = qlge_tx_timeout; | ||
3764 | ndev->watchdog_timeo = 10 * HZ; | 3774 | ndev->watchdog_timeo = 10 * HZ; |
3765 | ndev->vlan_rx_register = ql_vlan_rx_register; | 3775 | |
3766 | ndev->vlan_rx_add_vid = ql_vlan_rx_add_vid; | ||
3767 | ndev->vlan_rx_kill_vid = ql_vlan_rx_kill_vid; | ||
3768 | err = register_netdev(ndev); | 3776 | err = register_netdev(ndev); |
3769 | if (err) { | 3777 | if (err) { |
3770 | dev_err(&pdev->dev, "net device registration failed.\n"); | 3778 | dev_err(&pdev->dev, "net device registration failed.\n"); |