diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-21 20:36:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-21 20:36:58 -0500 |
commit | da1c14a19b978a95180ea91ab0008b97a5843995 (patch) | |
tree | 2f16f6b262a18f3a80a1f8718344a9233dfb8ad3 /drivers/net/qla3xxx.c | |
parent | a8652d237b599a03d7d982fcfdab276706babfa5 (diff) |
qla3xxx: convert to net_device_ops
Convert this driver to 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/qla3xxx.c')
-rw-r--r-- | drivers/net/qla3xxx.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index f188736028d7..7671f943974c 100644 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c | |||
@@ -3900,6 +3900,17 @@ static void ql3xxx_timer(unsigned long ptr) | |||
3900 | queue_delayed_work(qdev->workqueue, &qdev->link_state_work, 0); | 3900 | queue_delayed_work(qdev->workqueue, &qdev->link_state_work, 0); |
3901 | } | 3901 | } |
3902 | 3902 | ||
3903 | static const struct net_device_ops ql3xxx_netdev_ops = { | ||
3904 | .ndo_open = ql3xxx_open, | ||
3905 | .ndo_start_xmit = ql3xxx_send, | ||
3906 | .ndo_stop = ql3xxx_close, | ||
3907 | .ndo_set_multicast_list = NULL, /* not allowed on NIC side */ | ||
3908 | .ndo_change_mtu = eth_change_mtu, | ||
3909 | .ndo_validate_addr = eth_validate_addr, | ||
3910 | .ndo_set_mac_address = ql3xxx_set_mac_address, | ||
3911 | .ndo_tx_timeout = ql3xxx_tx_timeout, | ||
3912 | }; | ||
3913 | |||
3903 | static int __devinit ql3xxx_probe(struct pci_dev *pdev, | 3914 | static int __devinit ql3xxx_probe(struct pci_dev *pdev, |
3904 | const struct pci_device_id *pci_entry) | 3915 | const struct pci_device_id *pci_entry) |
3905 | { | 3916 | { |
@@ -3978,17 +3989,8 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev, | |||
3978 | spin_lock_init(&qdev->hw_lock); | 3989 | spin_lock_init(&qdev->hw_lock); |
3979 | 3990 | ||
3980 | /* Set driver entry points */ | 3991 | /* Set driver entry points */ |
3981 | ndev->open = ql3xxx_open; | 3992 | ndev->netdev_ops = &ql3xxx_netdev_ops; |
3982 | ndev->hard_start_xmit = ql3xxx_send; | ||
3983 | ndev->stop = ql3xxx_close; | ||
3984 | /* ndev->set_multicast_list | ||
3985 | * This device is one side of a two-function adapter | ||
3986 | * (NIC and iSCSI). Promiscuous mode setting/clearing is | ||
3987 | * not allowed from the NIC side. | ||
3988 | */ | ||
3989 | SET_ETHTOOL_OPS(ndev, &ql3xxx_ethtool_ops); | 3993 | SET_ETHTOOL_OPS(ndev, &ql3xxx_ethtool_ops); |
3990 | ndev->set_mac_address = ql3xxx_set_mac_address; | ||
3991 | ndev->tx_timeout = ql3xxx_tx_timeout; | ||
3992 | ndev->watchdog_timeo = 5 * HZ; | 3994 | ndev->watchdog_timeo = 5 * HZ; |
3993 | 3995 | ||
3994 | netif_napi_add(ndev, &qdev->napi, ql_poll, 64); | 3996 | netif_napi_add(ndev, &qdev->napi, ql_poll, 64); |