diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/Kconfig | 9 | ||||
-rw-r--r-- | drivers/net/ariadne.c | 47 | ||||
-rw-r--r-- | drivers/net/hamradio/6pack.c | 2 | ||||
-rw-r--r-- | drivers/net/hamradio/mkiss.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/irtty-sir.c | 2 | ||||
-rw-r--r-- | drivers/net/netconsole.c | 10 | ||||
-rw-r--r-- | drivers/net/ppp_async.c | 2 | ||||
-rw-r--r-- | drivers/net/ppp_synctty.c | 2 | ||||
-rw-r--r-- | drivers/net/slip.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/pc300_tty.c | 4 | ||||
-rw-r--r-- | drivers/net/wan/x25_asy.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/strip.c | 2 |
12 files changed, 36 insertions, 50 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 611e9fb..3e5e64c 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -325,15 +325,6 @@ config APNE To compile this driver as a module, choose M here: the module will be called apne. -config APOLLO_ELPLUS - tristate "Apollo 3c505 support" - depends on APOLLO - help - Say Y or M here if your Apollo has a 3Com 3c505 ISA Ethernet card. - If you don't have one made for Apollos, you can use one from a PC, - except that your Apollo won't be able to boot from it (because the - code in the ROM will be for a PC). - config MAC8390 bool "Macintosh NS 8390 based ethernet cards" depends on MAC diff --git a/drivers/net/ariadne.c b/drivers/net/ariadne.c index 10f3a19..29e53eb 100644 --- a/drivers/net/ariadne.c +++ b/drivers/net/ariadne.c @@ -98,7 +98,6 @@ struct ariadne_private { volatile u_short *rx_buff[RX_RING_SIZE]; int cur_tx, cur_rx; /* The next free ring entry */ int dirty_tx; /* The ring entries to be free()ed. */ - struct net_device_stats stats; char tx_full; }; @@ -378,20 +377,19 @@ static void ariadne_init_ring(struct net_device *dev) static int ariadne_close(struct net_device *dev) { - struct ariadne_private *priv = netdev_priv(dev); volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr; netif_stop_queue(dev); lance->RAP = CSR112; /* Missed Frame Count */ - priv->stats.rx_missed_errors = swapw(lance->RDP); + dev->stats.rx_missed_errors = swapw(lance->RDP); lance->RAP = CSR0; /* PCnet-ISA Controller Status */ if (ariadne_debug > 1) { printk(KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n", dev->name, lance->RDP); printk(KERN_DEBUG "%s: %lu packets missed\n", dev->name, - priv->stats.rx_missed_errors); + dev->stats.rx_missed_errors); } /* We stop the LANCE here -- it occasionally polls memory if we don't. */ @@ -502,16 +500,16 @@ static irqreturn_t ariadne_interrupt(int irq, void *data) if (status & TF_ERR) { /* There was an major error, log it. */ int err_status = priv->tx_ring[entry]->TMD3; - priv->stats.tx_errors++; + dev->stats.tx_errors++; if (err_status & EF_RTRY) - priv->stats.tx_aborted_errors++; + dev->stats.tx_aborted_errors++; if (err_status & EF_LCAR) - priv->stats.tx_carrier_errors++; + dev->stats.tx_carrier_errors++; if (err_status & EF_LCOL) - priv->stats.tx_window_errors++; + dev->stats.tx_window_errors++; if (err_status & EF_UFLO) { /* Ackk! On FIFO errors the Tx unit is turned off! */ - priv->stats.tx_fifo_errors++; + dev->stats.tx_fifo_errors++; /* Remove this verbosity later! */ printk(KERN_ERR "%s: Tx FIFO error! Status %4.4x.\n", dev->name, csr0); @@ -520,8 +518,8 @@ static irqreturn_t ariadne_interrupt(int irq, void *data) } } else { if (status & (TF_MORE|TF_ONE)) - priv->stats.collisions++; - priv->stats.tx_packets++; + dev->stats.collisions++; + dev->stats.tx_packets++; } dirty_tx++; } @@ -547,11 +545,11 @@ static irqreturn_t ariadne_interrupt(int irq, void *data) /* Log misc errors. */ if (csr0 & BABL) { handled = 1; - priv->stats.tx_errors++; /* Tx babble. */ + dev->stats.tx_errors++; /* Tx babble. */ } if (csr0 & MISS) { handled = 1; - priv->stats.rx_errors++; /* Missed a Rx frame. */ + dev->stats.rx_errors++; /* Missed a Rx frame. */ } if (csr0 & MERR) { handled = 1; @@ -672,7 +670,7 @@ static int ariadne_start_xmit(struct sk_buff *skb, struct net_device *dev) priv->cur_tx -= TX_RING_SIZE; priv->dirty_tx -= TX_RING_SIZE; } - priv->stats.tx_bytes += len; + dev->stats.tx_bytes += len; /* Trigger an immediate send poll. */ lance->RAP = CSR0; /* PCnet-ISA Controller Status */ @@ -707,15 +705,15 @@ static int ariadne_rx(struct net_device *dev) buffers, with only the last correctly noting the error. */ if (status & RF_ENP) /* Only count a general error at the end of a packet.*/ - priv->stats.rx_errors++; + dev->stats.rx_errors++; if (status & RF_FRAM) - priv->stats.rx_frame_errors++; + dev->stats.rx_frame_errors++; if (status & RF_OFLO) - priv->stats.rx_over_errors++; + dev->stats.rx_over_errors++; if (status & RF_CRC) - priv->stats.rx_crc_errors++; + dev->stats.rx_crc_errors++; if (status & RF_BUFF) - priv->stats.rx_fifo_errors++; + dev->stats.rx_fifo_errors++; priv->rx_ring[entry]->RMD1 &= 0xff00|RF_STP|RF_ENP; } else { /* Malloc up new buffer, compatible with net-3. */ @@ -731,7 +729,7 @@ static int ariadne_rx(struct net_device *dev) break; if (i > RX_RING_SIZE-2) { - priv->stats.rx_dropped++; + dev->stats.rx_dropped++; priv->rx_ring[entry]->RMD1 |= RF_OWN; priv->cur_rx++; } @@ -764,8 +762,8 @@ static int ariadne_rx(struct net_device *dev) netif_rx(skb); dev->last_rx = jiffies; - priv->stats.rx_packets++; - priv->stats.rx_bytes += pkt_len; + dev->stats.rx_packets++; + dev->stats.rx_bytes += pkt_len; } priv->rx_ring[entry]->RMD1 |= RF_OWN; @@ -783,7 +781,6 @@ static int ariadne_rx(struct net_device *dev) static struct net_device_stats *ariadne_get_stats(struct net_device *dev) { - struct ariadne_private *priv = netdev_priv(dev); volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr; short saved_addr; unsigned long flags; @@ -791,11 +788,11 @@ static struct net_device_stats *ariadne_get_stats(struct net_device *dev) local_irq_save(flags); saved_addr = lance->RAP; lance->RAP = CSR112; /* Missed Frame Count */ - priv->stats.rx_missed_errors = swapw(lance->RDP); + dev->stats.rx_missed_errors = swapw(lance->RDP); lance->RAP = saved_addr; local_irq_restore(flags); - return &priv->stats; + return &dev->stats; } diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index ffc937f..0f501d2 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c @@ -775,7 +775,7 @@ static int sixpack_ioctl(struct tty_struct *tty, struct file *file, return err; } -static struct tty_ldisc sp_ldisc = { +static struct tty_ldisc_ops sp_ldisc = { .owner = THIS_MODULE, .magic = TTY_LDISC_MAGIC, .name = "6pack", diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index b8740e6..3249df5 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c @@ -971,7 +971,7 @@ out: mkiss_put(ax); } -static struct tty_ldisc ax_ldisc = { +static struct tty_ldisc_ops ax_ldisc = { .owner = THIS_MODULE, .magic = TTY_LDISC_MAGIC, .name = "mkiss", diff --git a/drivers/net/irda/irtty-sir.c b/drivers/net/irda/irtty-sir.c index e6f40b7..9e33196 100644 --- a/drivers/net/irda/irtty-sir.c +++ b/drivers/net/irda/irtty-sir.c @@ -533,7 +533,7 @@ static void irtty_close(struct tty_struct *tty) /* ------------------------------------------------------- */ -static struct tty_ldisc irda_ldisc = { +static struct tty_ldisc_ops irda_ldisc = { .magic = TTY_LDISC_MAGIC, .name = "irda", .flags = 0, diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 387a133..e13966b 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -585,9 +585,8 @@ static struct config_item_type netconsole_target_type = { * Group operations and type for netconsole_subsys. */ -static int make_netconsole_target(struct config_group *group, - const char *name, - struct config_item **new_item) +static struct config_item *make_netconsole_target(struct config_group *group, + const char *name) { unsigned long flags; struct netconsole_target *nt; @@ -599,7 +598,7 @@ static int make_netconsole_target(struct config_group *group, nt = kzalloc(sizeof(*nt), GFP_KERNEL); if (!nt) { printk(KERN_ERR "netconsole: failed to allocate memory\n"); - return -ENOMEM; + return ERR_PTR(-ENOMEM); } nt->np.name = "netconsole"; @@ -616,8 +615,7 @@ static int make_netconsole_target(struct config_group *group, list_add(&nt->list, &target_list); spin_unlock_irqrestore(&target_list_lock, flags); - *new_item = &nt->item; - return 0; + return &nt->item; } static void drop_netconsole_target(struct config_group *group, diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c index f1a52de..451bdb5 100644 --- a/drivers/net/ppp_async.c +++ b/drivers/net/ppp_async.c @@ -378,7 +378,7 @@ ppp_asynctty_wakeup(struct tty_struct *tty) } -static struct tty_ldisc ppp_ldisc = { +static struct tty_ldisc_ops ppp_ldisc = { .owner = THIS_MODULE, .magic = TTY_LDISC_MAGIC, .name = "ppp", diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c index b8f0369..801d8f9 100644 --- a/drivers/net/ppp_synctty.c +++ b/drivers/net/ppp_synctty.c @@ -418,7 +418,7 @@ ppp_sync_wakeup(struct tty_struct *tty) } -static struct tty_ldisc ppp_sync_ldisc = { +static struct tty_ldisc_ops ppp_sync_ldisc = { .owner = THIS_MODULE, .magic = TTY_LDISC_MAGIC, .name = "pppsync", diff --git a/drivers/net/slip.c b/drivers/net/slip.c index 84af68f..1d58991 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c @@ -1301,7 +1301,7 @@ static int sl_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) #endif /* VSV changes end */ -static struct tty_ldisc sl_ldisc = { +static struct tty_ldisc_ops sl_ldisc = { .owner = THIS_MODULE, .magic = TTY_LDISC_MAGIC, .name = "slip", diff --git a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c index eae94ab..4518d0a 100644 --- a/drivers/net/wan/pc300_tty.c +++ b/drivers/net/wan/pc300_tty.c @@ -688,9 +688,9 @@ static void cpc_tty_rx_work(struct work_struct *work) if (cpc_tty->tty) { ld = tty_ldisc_ref(cpc_tty->tty); if (ld) { - if (ld->receive_buf) { + if (ld->ops->receive_buf) { CPC_TTY_DBG("%s: call line disc. receive_buf\n",cpc_tty->name); - ld->receive_buf(cpc_tty->tty, (char *)(buf->data), &flags, buf->size); + ld->ops->receive_buf(cpc_tty->tty, (char *)(buf->data), &flags, buf->size); } tty_ldisc_deref(ld); } diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 069f8bb..2a6c7a6 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c @@ -754,7 +754,7 @@ static void x25_asy_setup(struct net_device *dev) dev->flags = IFF_NOARP; } -static struct tty_ldisc x25_ldisc = { +static struct tty_ldisc_ops x25_ldisc = { .owner = THIS_MODULE, .magic = TTY_LDISC_MAGIC, .name = "X.25", diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c index 883af89..417e9e6 100644 --- a/drivers/net/wireless/strip.c +++ b/drivers/net/wireless/strip.c @@ -2728,7 +2728,7 @@ static int strip_ioctl(struct tty_struct *tty, struct file *file, /************************************************************************/ /* Initialization */ -static struct tty_ldisc strip_ldisc = { +static struct tty_ldisc_ops strip_ldisc = { .magic = TTY_LDISC_MAGIC, .name = "strip", .owner = THIS_MODULE, |