aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/dscc4.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wan/dscc4.c')
-rw-r--r--drivers/net/wan/dscc4.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
index 888025db2f02..8face5db8f32 100644
--- a/drivers/net/wan/dscc4.c
+++ b/drivers/net/wan/dscc4.c
@@ -883,6 +883,15 @@ static inline int dscc4_set_quartz(struct dscc4_dev_priv *dpriv, int hz)
883 return ret; 883 return ret;
884} 884}
885 885
886static const struct net_device_ops dscc4_ops = {
887 .ndo_open = dscc4_open,
888 .ndo_stop = dscc4_close,
889 .ndo_change_mtu = hdlc_change_mtu,
890 .ndo_start_xmit = hdlc_start_xmit,
891 .ndo_do_ioctl = dscc4_ioctl,
892 .ndo_tx_timeout = dscc4_tx_timeout,
893};
894
886static int dscc4_found1(struct pci_dev *pdev, void __iomem *ioaddr) 895static int dscc4_found1(struct pci_dev *pdev, void __iomem *ioaddr)
887{ 896{
888 struct dscc4_pci_priv *ppriv; 897 struct dscc4_pci_priv *ppriv;
@@ -916,13 +925,8 @@ static int dscc4_found1(struct pci_dev *pdev, void __iomem *ioaddr)
916 hdlc_device *hdlc = dev_to_hdlc(d); 925 hdlc_device *hdlc = dev_to_hdlc(d);
917 926
918 d->base_addr = (unsigned long)ioaddr; 927 d->base_addr = (unsigned long)ioaddr;
919 d->init = NULL;
920 d->irq = pdev->irq; 928 d->irq = pdev->irq;
921 d->open = dscc4_open; 929 d->netdev_ops = &dscc4_ops;
922 d->stop = dscc4_close;
923 d->set_multicast_list = NULL;
924 d->do_ioctl = dscc4_ioctl;
925 d->tx_timeout = dscc4_tx_timeout;
926 d->watchdog_timeo = TX_TIMEOUT; 930 d->watchdog_timeo = TX_TIMEOUT;
927 SET_NETDEV_DEV(d, &pdev->dev); 931 SET_NETDEV_DEV(d, &pdev->dev);
928 932
@@ -1048,7 +1052,7 @@ static int dscc4_open(struct net_device *dev)
1048 struct dscc4_pci_priv *ppriv; 1052 struct dscc4_pci_priv *ppriv;
1049 int ret = -EAGAIN; 1053 int ret = -EAGAIN;
1050 1054
1051 if ((dscc4_loopback_check(dpriv) < 0) || !dev->hard_start_xmit) 1055 if ((dscc4_loopback_check(dpriv) < 0))
1052 goto err; 1056 goto err;
1053 1057
1054 if ((ret = hdlc_open(dev))) 1058 if ((ret = hdlc_open(dev)))