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>
This commit is contained in:
Krzysztof Hałasa
2009-01-08 22:52:11 +01:00
committed by David S. Miller
parent dff3fde7be
commit 991990a12d
25 changed files with 186 additions and 133 deletions

View File

@@ -427,6 +427,15 @@ static void __exit cosa_exit(void)
}
module_exit(cosa_exit);
static const struct net_device_ops cosa_ops = {
.ndo_open = cosa_net_open,
.ndo_stop = cosa_net_close,
.ndo_change_mtu = hdlc_change_mtu,
.ndo_start_xmit = hdlc_start_xmit,
.ndo_do_ioctl = cosa_net_ioctl,
.ndo_tx_timeout = cosa_net_timeout,
};
static int cosa_probe(int base, int irq, int dma)
{
struct cosa_data *cosa = cosa_cards+nr_cards;
@@ -575,10 +584,7 @@ static int cosa_probe(int base, int irq, int dma)
}
dev_to_hdlc(chan->netdev)->attach = cosa_net_attach;
dev_to_hdlc(chan->netdev)->xmit = cosa_net_tx;
chan->netdev->open = cosa_net_open;
chan->netdev->stop = cosa_net_close;
chan->netdev->do_ioctl = cosa_net_ioctl;
chan->netdev->tx_timeout = cosa_net_timeout;
chan->netdev->netdev_ops = &cosa_ops;
chan->netdev->watchdog_timeo = TX_TIMEOUT;
chan->netdev->base_addr = chan->cosa->datareg;
chan->netdev->irq = chan->cosa->irq;