aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/cosa.c
diff options
context:
space:
mode:
authorKrzysztof Hałasa <khc@pm.waw.pl>2009-01-08 16:52:11 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-21 17:03:37 -0500
commit991990a12de42281f81b4e3a6471586d2d0caf6a (patch)
tree7b7ad34cf8218dab2ddd882a87b7c7a687b7d2ee /drivers/net/wan/cosa.c
parentdff3fde7be8f08c78914fca3d25e1cffe7625faa (diff)
WAN: Convert generic HDLC drivers to netdev_ops.
Also remove unneeded last_rx update from Synclink drivers. Synclink part mostly by Stephen Hemminger. Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan/cosa.c')
-rw-r--r--drivers/net/wan/cosa.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index d80b72e22dea..0d7ba117ef60 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net/wan/cosa.c
@@ -427,6 +427,15 @@ static void __exit cosa_exit(void)
427} 427}
428module_exit(cosa_exit); 428module_exit(cosa_exit);
429 429
430static const struct net_device_ops cosa_ops = {
431 .ndo_open = cosa_net_open,
432 .ndo_stop = cosa_net_close,
433 .ndo_change_mtu = hdlc_change_mtu,
434 .ndo_start_xmit = hdlc_start_xmit,
435 .ndo_do_ioctl = cosa_net_ioctl,
436 .ndo_tx_timeout = cosa_net_timeout,
437};
438
430static int cosa_probe(int base, int irq, int dma) 439static int cosa_probe(int base, int irq, int dma)
431{ 440{
432 struct cosa_data *cosa = cosa_cards+nr_cards; 441 struct cosa_data *cosa = cosa_cards+nr_cards;
@@ -575,10 +584,7 @@ static int cosa_probe(int base, int irq, int dma)
575 } 584 }
576 dev_to_hdlc(chan->netdev)->attach = cosa_net_attach; 585 dev_to_hdlc(chan->netdev)->attach = cosa_net_attach;
577 dev_to_hdlc(chan->netdev)->xmit = cosa_net_tx; 586 dev_to_hdlc(chan->netdev)->xmit = cosa_net_tx;
578 chan->netdev->open = cosa_net_open; 587 chan->netdev->netdev_ops = &cosa_ops;
579 chan->netdev->stop = cosa_net_close;
580 chan->netdev->do_ioctl = cosa_net_ioctl;
581 chan->netdev->tx_timeout = cosa_net_timeout;
582 chan->netdev->watchdog_timeo = TX_TIMEOUT; 588 chan->netdev->watchdog_timeo = TX_TIMEOUT;
583 chan->netdev->base_addr = chan->cosa->datareg; 589 chan->netdev->base_addr = chan->cosa->datareg;
584 chan->netdev->irq = chan->cosa->irq; 590 chan->netdev->irq = chan->cosa->irq;