aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/lmc/lmc_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wan/lmc/lmc_main.c')
-rw-r--r--drivers/net/wan/lmc/lmc_main.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c
index feac3b99f8fe..45b1822c962d 100644
--- a/drivers/net/wan/lmc/lmc_main.c
+++ b/drivers/net/wan/lmc/lmc_main.c
@@ -806,6 +806,16 @@ static int lmc_attach(struct net_device *dev, unsigned short encoding,
806 return -EINVAL; 806 return -EINVAL;
807} 807}
808 808
809static const struct net_device_ops lmc_ops = {
810 .ndo_open = lmc_open,
811 .ndo_stop = lmc_close,
812 .ndo_change_mtu = hdlc_change_mtu,
813 .ndo_start_xmit = hdlc_start_xmit,
814 .ndo_do_ioctl = lmc_ioctl,
815 .ndo_tx_timeout = lmc_driver_timeout,
816 .ndo_get_stats = lmc_get_stats,
817};
818
809static int __devinit lmc_init_one(struct pci_dev *pdev, 819static int __devinit lmc_init_one(struct pci_dev *pdev,
810 const struct pci_device_id *ent) 820 const struct pci_device_id *ent)
811{ 821{
@@ -849,11 +859,7 @@ static int __devinit lmc_init_one(struct pci_dev *pdev,
849 dev->type = ARPHRD_HDLC; 859 dev->type = ARPHRD_HDLC;
850 dev_to_hdlc(dev)->xmit = lmc_start_xmit; 860 dev_to_hdlc(dev)->xmit = lmc_start_xmit;
851 dev_to_hdlc(dev)->attach = lmc_attach; 861 dev_to_hdlc(dev)->attach = lmc_attach;
852 dev->open = lmc_open; 862 dev->netdev_ops = &lmc_ops;
853 dev->stop = lmc_close;
854 dev->get_stats = lmc_get_stats;
855 dev->do_ioctl = lmc_ioctl;
856 dev->tx_timeout = lmc_driver_timeout;
857 dev->watchdog_timeo = HZ; /* 1 second */ 863 dev->watchdog_timeo = HZ; /* 1 second */
858 dev->tx_queue_len = 100; 864 dev->tx_queue_len = 100;
859 sc->lmc_device = dev; 865 sc->lmc_device = dev;
@@ -1059,9 +1065,6 @@ static int lmc_open(struct net_device *dev)
1059 if ((err = lmc_proto_open(sc)) != 0) 1065 if ((err = lmc_proto_open(sc)) != 0)
1060 return err; 1066 return err;
1061 1067
1062 dev->do_ioctl = lmc_ioctl;
1063
1064
1065 netif_start_queue(dev); 1068 netif_start_queue(dev);
1066 sc->extra_stats.tx_tbusy0++; 1069 sc->extra_stats.tx_tbusy0++;
1067 1070