Commit afa05724 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] more 2.0/2.2 bits

parent 29858ea5
...@@ -376,11 +376,9 @@ int __init mac8390_probe(struct net_device * dev) ...@@ -376,11 +376,9 @@ int __init mac8390_probe(struct net_device * dev)
} }
#ifdef MODULE #ifdef MODULE
#if LINUX_VERSION_CODE > 0x20118
MODULE_AUTHOR("David Huggins-Daines <dhd@debian.org> and others"); MODULE_AUTHOR("David Huggins-Daines <dhd@debian.org> and others");
MODULE_DESCRIPTION("Macintosh NS8390-based Nubus Ethernet driver"); MODULE_DESCRIPTION("Macintosh NS8390-based Nubus Ethernet driver");
MODUEL_LICENSE("GPL"); MODUEL_LICENSE("GPL");
#endif
int init_module(void) int init_module(void)
{ {
......
...@@ -649,9 +649,7 @@ static u16 irqrx_handler(struct SKMCA_NETDEV *dev, u16 oldcsr0) ...@@ -649,9 +649,7 @@ static u16 irqrx_handler(struct SKMCA_NETDEV *dev, u16 oldcsr0)
skb->protocol = eth_type_trans(skb, dev); skb->protocol = eth_type_trans(skb, dev);
skb->ip_summed = CHECKSUM_NONE; skb->ip_summed = CHECKSUM_NONE;
priv->stat.rx_packets++; priv->stat.rx_packets++;
#if LINUX_VERSION_CODE >= 0x020119 /* byte counters for >= 2.1.25 */
priv->stat.rx_bytes += descr.Len; priv->stat.rx_bytes += descr.Len;
#endif
netif_rx(skb); netif_rx(skb);
dev->last_rx = jiffies; dev->last_rx = jiffies;
} }
...@@ -709,9 +707,7 @@ static u16 irqtx_handler(struct SKMCA_NETDEV *dev, u16 oldcsr0) ...@@ -709,9 +707,7 @@ static u16 irqtx_handler(struct SKMCA_NETDEV *dev, u16 oldcsr0)
/* update statistics */ /* update statistics */
if ((descr.Flags & TXDSCR_FLAGS_ERR) == 0) { if ((descr.Flags & TXDSCR_FLAGS_ERR) == 0) {
priv->stat.tx_packets++; priv->stat.tx_packets++;
#if LINUX_VERSION_CODE >= 0x020119 /* byte counters for >= 2.1.25 */
priv->stat.tx_bytes++; priv->stat.tx_bytes++;
#endif
} else { } else {
priv->stat.tx_errors++; priv->stat.tx_errors++;
if ((descr.Status & TXDSCR_STATUS_UFLO) != 0) { if ((descr.Status & TXDSCR_STATUS_UFLO) != 0) {
...@@ -1001,13 +997,8 @@ static int skmca_tx(struct sk_buff *skb, struct SKMCA_NETDEV *dev) ...@@ -1001,13 +997,8 @@ static int skmca_tx(struct sk_buff *skb, struct SKMCA_NETDEV *dev)
tx_done: tx_done:
/* When did that change exactly ? */
#if LINUX_VERSION_CODE >= 0x020200
dev_kfree_skb(skb); dev_kfree_skb(skb);
#else
dev_kfree_skb(skb, FREE_WRITE);
#endif
return retval; return retval;
} }
...@@ -1146,9 +1137,7 @@ int __init skmca_probe(struct SKMCA_NETDEV *dev) ...@@ -1146,9 +1137,7 @@ int __init skmca_probe(struct SKMCA_NETDEV *dev)
mca_set_adapter_name(slot, "SKNET MC2+ Ethernet Adapter"); mca_set_adapter_name(slot, "SKNET MC2+ Ethernet Adapter");
mca_set_adapter_procfn(slot, (MCA_ProcFn) skmca_getinfo, dev); mca_set_adapter_procfn(slot, (MCA_ProcFn) skmca_getinfo, dev);
#if LINUX_VERSION_CODE >= 0x020200
mca_mark_as_used(slot); mca_mark_as_used(slot);
#endif
/* announce success */ /* announce success */
printk("%s: SKNet %s adapter found in slot %d\n", dev->name, printk("%s: SKNet %s adapter found in slot %d\n", dev->name,
...@@ -1283,9 +1272,7 @@ void cleanup_module(void) ...@@ -1283,9 +1272,7 @@ void cleanup_module(void)
free_irq(dev->irq, dev); free_irq(dev->irq, dev);
dev->irq = 0; dev->irq = 0;
unregister_netdev(dev); unregister_netdev(dev);
#if LINUX_VERSION_CODE >= 0x020200
mca_mark_as_unused(priv->slot); mca_mark_as_unused(priv->slot);
#endif
mca_set_adapter_procfn(priv->slot, NULL, NULL); mca_set_adapter_procfn(priv->slot, NULL, NULL);
kfree(dev->priv); kfree(dev->priv);
dev->priv = NULL; dev->priv = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment