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 611e9fb18b67..3e5e64c33e18 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -325,15 +325,6 @@ config APNE | |||
325 | To compile this driver as a module, choose M here: the module | 325 | To compile this driver as a module, choose M here: the module |
326 | will be called apne. | 326 | will be called apne. |
327 | 327 | ||
328 | config APOLLO_ELPLUS | ||
329 | tristate "Apollo 3c505 support" | ||
330 | depends on APOLLO | ||
331 | help | ||
332 | Say Y or M here if your Apollo has a 3Com 3c505 ISA Ethernet card. | ||
333 | If you don't have one made for Apollos, you can use one from a PC, | ||
334 | except that your Apollo won't be able to boot from it (because the | ||
335 | code in the ROM will be for a PC). | ||
336 | |||
337 | config MAC8390 | 328 | config MAC8390 |
338 | bool "Macintosh NS 8390 based ethernet cards" | 329 | bool "Macintosh NS 8390 based ethernet cards" |
339 | depends on MAC | 330 | depends on MAC |
diff --git a/drivers/net/ariadne.c b/drivers/net/ariadne.c index 10f3a196be32..29e53eb71c74 100644 --- a/drivers/net/ariadne.c +++ b/drivers/net/ariadne.c | |||
@@ -98,7 +98,6 @@ struct ariadne_private { | |||
98 | volatile u_short *rx_buff[RX_RING_SIZE]; | 98 | volatile u_short *rx_buff[RX_RING_SIZE]; |
99 | int cur_tx, cur_rx; /* The next free ring entry */ | 99 | int cur_tx, cur_rx; /* The next free ring entry */ |
100 | int dirty_tx; /* The ring entries to be free()ed. */ | 100 | int dirty_tx; /* The ring entries to be free()ed. */ |
101 | struct net_device_stats stats; | ||
102 | char tx_full; | 101 | char tx_full; |
103 | }; | 102 | }; |
104 | 103 | ||
@@ -378,20 +377,19 @@ static void ariadne_init_ring(struct net_device *dev) | |||
378 | 377 | ||
379 | static int ariadne_close(struct net_device *dev) | 378 | static int ariadne_close(struct net_device *dev) |
380 | { | 379 | { |
381 | struct ariadne_private *priv = netdev_priv(dev); | ||
382 | volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr; | 380 | volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr; |
383 | 381 | ||
384 | netif_stop_queue(dev); | 382 | netif_stop_queue(dev); |
385 | 383 | ||
386 | lance->RAP = CSR112; /* Missed Frame Count */ | 384 | lance->RAP = CSR112; /* Missed Frame Count */ |
387 | priv->stats.rx_missed_errors = swapw(lance->RDP); | 385 | dev->stats.rx_missed_errors = swapw(lance->RDP); |
388 | lance->RAP = CSR0; /* PCnet-ISA Controller Status */ | 386 | lance->RAP = CSR0; /* PCnet-ISA Controller Status */ |
389 | 387 | ||
390 | if (ariadne_debug > 1) { | 388 | if (ariadne_debug > 1) { |
391 | printk(KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n", | 389 | printk(KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n", |
392 | dev->name, lance->RDP); | 390 | dev->name, lance->RDP); |
393 | printk(KERN_DEBUG "%s: %lu packets missed\n", dev->name, | 391 | printk(KERN_DEBUG "%s: %lu packets missed\n", dev->name, |
394 | priv->stats.rx_missed_errors); | 392 | dev->stats.rx_missed_errors); |
395 | } | 393 | } |
396 | 394 | ||
397 | /* We stop the LANCE here -- it occasionally polls memory if we don't. */ | 395 | /* 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) | |||
502 | if (status & TF_ERR) { | 500 | if (status & TF_ERR) { |
503 | /* There was an major error, log it. */ | 501 | /* There was an major error, log it. */ |
504 | int err_status = priv->tx_ring[entry]->TMD3; | 502 | int err_status = priv->tx_ring[entry]->TMD3; |
505 | priv->stats.tx_errors++; | 503 | dev->stats.tx_errors++; |
506 | if (err_status & EF_RTRY) | 504 | if (err_status & EF_RTRY) |
507 | priv->stats.tx_aborted_errors++; | 505 | dev->stats.tx_aborted_errors++; |
508 | if (err_status & EF_LCAR) | 506 | if (err_status & EF_LCAR) |
509 | priv->stats.tx_carrier_errors++; | 507 | dev->stats.tx_carrier_errors++; |
510 | if (err_status & EF_LCOL) | 508 | if (err_status & EF_LCOL) |
511 | priv->stats.tx_window_errors++; | 509 | dev->stats.tx_window_errors++; |
512 | if (err_status & EF_UFLO) { | 510 | if (err_status & EF_UFLO) { |
513 | /* Ackk! On FIFO errors the Tx unit is turned off! */ | 511 | /* Ackk! On FIFO errors the Tx unit is turned off! */ |
514 | priv->stats.tx_fifo_errors++; | 512 | dev->stats.tx_fifo_errors++; |
515 | /* Remove this verbosity later! */ | 513 | /* Remove this verbosity later! */ |
516 | printk(KERN_ERR "%s: Tx FIFO error! Status %4.4x.\n", | 514 | printk(KERN_ERR "%s: Tx FIFO error! Status %4.4x.\n", |
517 | dev->name, csr0); | 515 | dev->name, csr0); |
@@ -520,8 +518,8 @@ static irqreturn_t ariadne_interrupt(int irq, void *data) | |||
520 | } | 518 | } |
521 | } else { | 519 | } else { |
522 | if (status & (TF_MORE|TF_ONE)) | 520 | if (status & (TF_MORE|TF_ONE)) |
523 | priv->stats.collisions++; | 521 | dev->stats.collisions++; |
524 | priv->stats.tx_packets++; | 522 | dev->stats.tx_packets++; |
525 | } | 523 | } |
526 | dirty_tx++; | 524 | dirty_tx++; |
527 | } | 525 | } |
@@ -547,11 +545,11 @@ static irqreturn_t ariadne_interrupt(int irq, void *data) | |||
547 | /* Log misc errors. */ | 545 | /* Log misc errors. */ |
548 | if (csr0 & BABL) { | 546 | if (csr0 & BABL) { |
549 | handled = 1; | 547 | handled = 1; |
550 | priv->stats.tx_errors++; /* Tx babble. */ | 548 | dev->stats.tx_errors++; /* Tx babble. */ |
551 | } | 549 | } |
552 | if (csr0 & MISS) { | 550 | if (csr0 & MISS) { |
553 | handled = 1; | 551 | handled = 1; |
554 | priv->stats.rx_errors++; /* Missed a Rx frame. */ | 552 | dev->stats.rx_errors++; /* Missed a Rx frame. */ |
555 | } | 553 | } |
556 | if (csr0 & MERR) { | 554 | if (csr0 & MERR) { |
557 | handled = 1; | 555 | handled = 1; |
@@ -672,7 +670,7 @@ static int ariadne_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
672 | priv->cur_tx -= TX_RING_SIZE; | 670 | priv->cur_tx -= TX_RING_SIZE; |
673 | priv->dirty_tx -= TX_RING_SIZE; | 671 | priv->dirty_tx -= TX_RING_SIZE; |
674 | } | 672 | } |
675 | priv->stats.tx_bytes += len; | 673 | dev->stats.tx_bytes += len; |
676 | 674 | ||
677 | /* Trigger an immediate send poll. */ | 675 | /* Trigger an immediate send poll. */ |
678 | lance->RAP = CSR0; /* PCnet-ISA Controller Status */ | 676 | lance->RAP = CSR0; /* PCnet-ISA Controller Status */ |
@@ -707,15 +705,15 @@ static int ariadne_rx(struct net_device *dev) | |||
707 | buffers, with only the last correctly noting the error. */ | 705 | buffers, with only the last correctly noting the error. */ |
708 | if (status & RF_ENP) | 706 | if (status & RF_ENP) |
709 | /* Only count a general error at the end of a packet.*/ | 707 | /* Only count a general error at the end of a packet.*/ |
710 | priv->stats.rx_errors++; | 708 | dev->stats.rx_errors++; |
711 | if (status & RF_FRAM) | 709 | if (status & RF_FRAM) |
712 | priv->stats.rx_frame_errors++; | 710 | dev->stats.rx_frame_errors++; |
713 | if (status & RF_OFLO) | 711 | if (status & RF_OFLO) |
714 | priv->stats.rx_over_errors++; | 712 | dev->stats.rx_over_errors++; |
715 | if (status & RF_CRC) | 713 | if (status & RF_CRC) |
716 | priv->stats.rx_crc_errors++; | 714 | dev->stats.rx_crc_errors++; |
717 | if (status & RF_BUFF) | 715 | if (status & RF_BUFF) |
718 | priv->stats.rx_fifo_errors++; | 716 | dev->stats.rx_fifo_errors++; |
719 | priv->rx_ring[entry]->RMD1 &= 0xff00|RF_STP|RF_ENP; | 717 | priv->rx_ring[entry]->RMD1 &= 0xff00|RF_STP|RF_ENP; |
720 | } else { | 718 | } else { |
721 | /* Malloc up new buffer, compatible with net-3. */ | 719 | /* Malloc up new buffer, compatible with net-3. */ |
@@ -731,7 +729,7 @@ static int ariadne_rx(struct net_device *dev) | |||
731 | break; | 729 | break; |
732 | 730 | ||
733 | if (i > RX_RING_SIZE-2) { | 731 | if (i > RX_RING_SIZE-2) { |
734 | priv->stats.rx_dropped++; | 732 | dev->stats.rx_dropped++; |
735 | priv->rx_ring[entry]->RMD1 |= RF_OWN; | 733 | priv->rx_ring[entry]->RMD1 |= RF_OWN; |
736 | priv->cur_rx++; | 734 | priv->cur_rx++; |
737 | } | 735 | } |
@@ -764,8 +762,8 @@ static int ariadne_rx(struct net_device *dev) | |||
764 | 762 | ||
765 | netif_rx(skb); | 763 | netif_rx(skb); |
766 | dev->last_rx = jiffies; | 764 | dev->last_rx = jiffies; |
767 | priv->stats.rx_packets++; | 765 | dev->stats.rx_packets++; |
768 | priv->stats.rx_bytes += pkt_len; | 766 | dev->stats.rx_bytes += pkt_len; |
769 | } | 767 | } |
770 | 768 | ||
771 | priv->rx_ring[entry]->RMD1 |= RF_OWN; | 769 | priv->rx_ring[entry]->RMD1 |= RF_OWN; |
@@ -783,7 +781,6 @@ static int ariadne_rx(struct net_device *dev) | |||
783 | 781 | ||
784 | static struct net_device_stats *ariadne_get_stats(struct net_device *dev) | 782 | static struct net_device_stats *ariadne_get_stats(struct net_device *dev) |
785 | { | 783 | { |
786 | struct ariadne_private *priv = netdev_priv(dev); | ||
787 | volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr; | 784 | volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr; |
788 | short saved_addr; | 785 | short saved_addr; |
789 | unsigned long flags; | 786 | unsigned long flags; |
@@ -791,11 +788,11 @@ static struct net_device_stats *ariadne_get_stats(struct net_device *dev) | |||
791 | local_irq_save(flags); | 788 | local_irq_save(flags); |
792 | saved_addr = lance->RAP; | 789 | saved_addr = lance->RAP; |
793 | lance->RAP = CSR112; /* Missed Frame Count */ | 790 | lance->RAP = CSR112; /* Missed Frame Count */ |
794 | priv->stats.rx_missed_errors = swapw(lance->RDP); | 791 | dev->stats.rx_missed_errors = swapw(lance->RDP); |
795 | lance->RAP = saved_addr; | 792 | lance->RAP = saved_addr; |
796 | local_irq_restore(flags); | 793 | local_irq_restore(flags); |
797 | 794 | ||
798 | return &priv->stats; | 795 | return &dev->stats; |
799 | } | 796 | } |
800 | 797 | ||
801 | 798 | ||
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index ffc937f5d15d..0f501d2ca935 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, | |||
775 | return err; | 775 | return err; |
776 | } | 776 | } |
777 | 777 | ||
778 | static struct tty_ldisc sp_ldisc = { | 778 | static struct tty_ldisc_ops sp_ldisc = { |
779 | .owner = THIS_MODULE, | 779 | .owner = THIS_MODULE, |
780 | .magic = TTY_LDISC_MAGIC, | 780 | .magic = TTY_LDISC_MAGIC, |
781 | .name = "6pack", | 781 | .name = "6pack", |
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index b8740e6a5cec..3249df5e0f17 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c | |||
@@ -971,7 +971,7 @@ out: | |||
971 | mkiss_put(ax); | 971 | mkiss_put(ax); |
972 | } | 972 | } |
973 | 973 | ||
974 | static struct tty_ldisc ax_ldisc = { | 974 | static struct tty_ldisc_ops ax_ldisc = { |
975 | .owner = THIS_MODULE, | 975 | .owner = THIS_MODULE, |
976 | .magic = TTY_LDISC_MAGIC, | 976 | .magic = TTY_LDISC_MAGIC, |
977 | .name = "mkiss", | 977 | .name = "mkiss", |
diff --git a/drivers/net/irda/irtty-sir.c b/drivers/net/irda/irtty-sir.c index e6f40b7f9041..9e33196f9459 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) | |||
533 | 533 | ||
534 | /* ------------------------------------------------------- */ | 534 | /* ------------------------------------------------------- */ |
535 | 535 | ||
536 | static struct tty_ldisc irda_ldisc = { | 536 | static struct tty_ldisc_ops irda_ldisc = { |
537 | .magic = TTY_LDISC_MAGIC, | 537 | .magic = TTY_LDISC_MAGIC, |
538 | .name = "irda", | 538 | .name = "irda", |
539 | .flags = 0, | 539 | .flags = 0, |
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 387a13395015..e13966bb5f77 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c | |||
@@ -585,9 +585,8 @@ static struct config_item_type netconsole_target_type = { | |||
585 | * Group operations and type for netconsole_subsys. | 585 | * Group operations and type for netconsole_subsys. |
586 | */ | 586 | */ |
587 | 587 | ||
588 | static int make_netconsole_target(struct config_group *group, | 588 | static struct config_item *make_netconsole_target(struct config_group *group, |
589 | const char *name, | 589 | const char *name) |
590 | struct config_item **new_item) | ||
591 | { | 590 | { |
592 | unsigned long flags; | 591 | unsigned long flags; |
593 | struct netconsole_target *nt; | 592 | struct netconsole_target *nt; |
@@ -599,7 +598,7 @@ static int make_netconsole_target(struct config_group *group, | |||
599 | nt = kzalloc(sizeof(*nt), GFP_KERNEL); | 598 | nt = kzalloc(sizeof(*nt), GFP_KERNEL); |
600 | if (!nt) { | 599 | if (!nt) { |
601 | printk(KERN_ERR "netconsole: failed to allocate memory\n"); | 600 | printk(KERN_ERR "netconsole: failed to allocate memory\n"); |
602 | return -ENOMEM; | 601 | return ERR_PTR(-ENOMEM); |
603 | } | 602 | } |
604 | 603 | ||
605 | nt->np.name = "netconsole"; | 604 | nt->np.name = "netconsole"; |
@@ -616,8 +615,7 @@ static int make_netconsole_target(struct config_group *group, | |||
616 | list_add(&nt->list, &target_list); | 615 | list_add(&nt->list, &target_list); |
617 | spin_unlock_irqrestore(&target_list_lock, flags); | 616 | spin_unlock_irqrestore(&target_list_lock, flags); |
618 | 617 | ||
619 | *new_item = &nt->item; | 618 | return &nt->item; |
620 | return 0; | ||
621 | } | 619 | } |
622 | 620 | ||
623 | static void drop_netconsole_target(struct config_group *group, | 621 | static void drop_netconsole_target(struct config_group *group, |
diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c index f1a52def1241..451bdb57d6fc 100644 --- a/drivers/net/ppp_async.c +++ b/drivers/net/ppp_async.c | |||
@@ -378,7 +378,7 @@ ppp_asynctty_wakeup(struct tty_struct *tty) | |||
378 | } | 378 | } |
379 | 379 | ||
380 | 380 | ||
381 | static struct tty_ldisc ppp_ldisc = { | 381 | static struct tty_ldisc_ops ppp_ldisc = { |
382 | .owner = THIS_MODULE, | 382 | .owner = THIS_MODULE, |
383 | .magic = TTY_LDISC_MAGIC, | 383 | .magic = TTY_LDISC_MAGIC, |
384 | .name = "ppp", | 384 | .name = "ppp", |
diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c index b8f0369a71e7..801d8f99d471 100644 --- a/drivers/net/ppp_synctty.c +++ b/drivers/net/ppp_synctty.c | |||
@@ -418,7 +418,7 @@ ppp_sync_wakeup(struct tty_struct *tty) | |||
418 | } | 418 | } |
419 | 419 | ||
420 | 420 | ||
421 | static struct tty_ldisc ppp_sync_ldisc = { | 421 | static struct tty_ldisc_ops ppp_sync_ldisc = { |
422 | .owner = THIS_MODULE, | 422 | .owner = THIS_MODULE, |
423 | .magic = TTY_LDISC_MAGIC, | 423 | .magic = TTY_LDISC_MAGIC, |
424 | .name = "pppsync", | 424 | .name = "pppsync", |
diff --git a/drivers/net/slip.c b/drivers/net/slip.c index 84af68fdb6c2..1d58991d395b 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) | |||
1301 | #endif | 1301 | #endif |
1302 | /* VSV changes end */ | 1302 | /* VSV changes end */ |
1303 | 1303 | ||
1304 | static struct tty_ldisc sl_ldisc = { | 1304 | static struct tty_ldisc_ops sl_ldisc = { |
1305 | .owner = THIS_MODULE, | 1305 | .owner = THIS_MODULE, |
1306 | .magic = TTY_LDISC_MAGIC, | 1306 | .magic = TTY_LDISC_MAGIC, |
1307 | .name = "slip", | 1307 | .name = "slip", |
diff --git a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c index eae94ab6b818..4518d0aa2480 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) | |||
688 | if (cpc_tty->tty) { | 688 | if (cpc_tty->tty) { |
689 | ld = tty_ldisc_ref(cpc_tty->tty); | 689 | ld = tty_ldisc_ref(cpc_tty->tty); |
690 | if (ld) { | 690 | if (ld) { |
691 | if (ld->receive_buf) { | 691 | if (ld->ops->receive_buf) { |
692 | CPC_TTY_DBG("%s: call line disc. receive_buf\n",cpc_tty->name); | 692 | CPC_TTY_DBG("%s: call line disc. receive_buf\n",cpc_tty->name); |
693 | ld->receive_buf(cpc_tty->tty, (char *)(buf->data), &flags, buf->size); | 693 | ld->ops->receive_buf(cpc_tty->tty, (char *)(buf->data), &flags, buf->size); |
694 | } | 694 | } |
695 | tty_ldisc_deref(ld); | 695 | tty_ldisc_deref(ld); |
696 | } | 696 | } |
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 069f8bb0a99f..2a6c7a60756f 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) | |||
754 | dev->flags = IFF_NOARP; | 754 | dev->flags = IFF_NOARP; |
755 | } | 755 | } |
756 | 756 | ||
757 | static struct tty_ldisc x25_ldisc = { | 757 | static struct tty_ldisc_ops x25_ldisc = { |
758 | .owner = THIS_MODULE, | 758 | .owner = THIS_MODULE, |
759 | .magic = TTY_LDISC_MAGIC, | 759 | .magic = TTY_LDISC_MAGIC, |
760 | .name = "X.25", | 760 | .name = "X.25", |
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c index 883af891ebfb..417e9e675fac 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, | |||
2728 | /************************************************************************/ | 2728 | /************************************************************************/ |
2729 | /* Initialization */ | 2729 | /* Initialization */ |
2730 | 2730 | ||
2731 | static struct tty_ldisc strip_ldisc = { | 2731 | static struct tty_ldisc_ops strip_ldisc = { |
2732 | .magic = TTY_LDISC_MAGIC, | 2732 | .magic = TTY_LDISC_MAGIC, |
2733 | .name = "strip", | 2733 | .name = "strip", |
2734 | .owner = THIS_MODULE, | 2734 | .owner = THIS_MODULE, |