aranym: Convert to net_device_ops
Geert Uytterhoeven
maintainerPATCH 1/1 aranym: Convert to net_device_ops
Signed-off-by Geert Uytterhoeven <[email protected]>
---
Compile test only
arch/m68k/emu/nfeth.c | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-)
arch/m68k/emu/nfeth.c +13 -5
@@ -196,6 +196,17 @@ static struct net_device_stats *nfeth_get_stats(struct net_device *dev)return &priv->stats; } +static const struct net_device_ops nfeth_netdev_ops = { + .ndo_open = nfeth_open, + .ndo_stop = nfeth_stop, + .ndo_start_xmit = nfeth_xmit, + .ndo_tx_timeout = nfeth_tx_timeout, + .ndo_get_stats = nfeth_get_stats, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, +}; +struct net_device *__init nfeth_probe (int unit) {struct net_device *dev;
@@ -212,11 +223,8 @@ struct net_device * __init nfeth_probe(int unit)return NULL ; dev->irq = nfEtherIRQ; - dev->open = nfeth_open; - dev->stop = nfeth_stop; - dev->hard_start_xmit = nfeth_xmit; - dev->tx_timeout = nfeth_tx_timeout; - dev->get_stats = nfeth_get_stats; + dev->netdev_ops = &nfeth_netdev_ops; + dev->flags |=NETIF_F_NO_CSUM ;memcpy (dev->dev_addr, mac,ETH_ALEN );
Signature · 12 lines
1.6.0.4
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus TorvaldsQuoted 3 lines · Geert Uytterhoeven
Signed-off-by Geert Uytterhoeven <[email protected]>---
Compile test only
Works fine here.
Andreas.
Signature · 3 lines
Andreas Schwab, [email protected] GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."