aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-30 11:14:42 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-30 11:14:42 -0400
commit152a6a9da1bd3ed5dcbbf6ff17c7ebde0eb9a754 (patch)
treecad354802870b7d4bc0402a6a6da44bd1f610bc6 /drivers/net
parentcd9bb7e7367c03400d6e918fd3502820fc3b9084 (diff)
parent80787ebc2bbd8e675d8b9ff8cfa40f15134feebe (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits) [IPV4] SNMP: Support OutMcastPkts and OutBcastPkts [IPV4] SNMP: Support InMcastPkts and InBcastPkts [IPV4] SNMP: Support InTruncatedPkts [IPV4] SNMP: Support InNoRoutes [SNMP]: Add definitions for {In,Out}BcastPkts [TCP] FRTO: RFC4138 allows Nagle override when new data must be sent [TCP] FRTO: Delay skb available check until it's mandatory [XFRM]: Restrict upper layer information by bundle. [TCP]: Catch skb with S+L bugs earlier [PATCH] INET : IPV4 UDP lookups converted to a 2 pass algo [L2TP]: Add the ability to autoload a pppox protocol module. [SKB]: Introduce skb_queue_walk_safe() [AF_IUCV/IUCV]: smp_call_function deadlock [IPV6]: Fix slab corruption running ip6sic [TCP]: Update references in two old comments [XFRM]: Export SPD info [IPV6]: Track device renames in snmp6. [SCTP]: Fix sctp_getsockopt_local_addrs_old() to use local storage. [NET]: Remove NETIF_F_INTERNAL_STATS, default to internal stats. [NETPOLL]: Remove CONFIG_NETPOLL_RX ...
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/Kconfig5
-rw-r--r--drivers/net/bonding/bond_main.c59
-rw-r--r--drivers/net/pppox.c8
3 files changed, 33 insertions, 39 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index eb4b96c4d388..dcdad217df51 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2927,11 +2927,6 @@ endif #NETDEVICES
2927config NETPOLL 2927config NETPOLL
2928 def_bool NETCONSOLE 2928 def_bool NETCONSOLE
2929 2929
2930config NETPOLL_RX
2931 bool "Netpoll support for trapping incoming packets"
2932 default n
2933 depends on NETPOLL
2934
2935config NETPOLL_TRAP 2930config NETPOLL_TRAP
2936 bool "Netpoll traffic trapping" 2931 bool "Netpoll traffic trapping"
2937 default n 2932 default n
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index cea3783c92c5..724bce51f936 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1360,13 +1360,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1360 goto err_undo_flags; 1360 goto err_undo_flags;
1361 } 1361 }
1362 1362
1363 if (slave_dev->get_stats == NULL) {
1364 printk(KERN_NOTICE DRV_NAME
1365 ": %s: the driver for slave device %s does not provide "
1366 "get_stats function, network statistics will be "
1367 "inaccurate.\n", bond_dev->name, slave_dev->name);
1368 }
1369
1370 new_slave = kzalloc(sizeof(struct slave), GFP_KERNEL); 1363 new_slave = kzalloc(sizeof(struct slave), GFP_KERNEL);
1371 if (!new_slave) { 1364 if (!new_slave) {
1372 res = -ENOMEM; 1365 res = -ENOMEM;
@@ -3641,33 +3634,31 @@ static struct net_device_stats *bond_get_stats(struct net_device *bond_dev)
3641 3634
3642 bond_for_each_slave(bond, slave, i) { 3635 bond_for_each_slave(bond, slave, i) {
3643 sstats = slave->dev->get_stats(slave->dev); 3636 sstats = slave->dev->get_stats(slave->dev);
3644 if (sstats) { 3637 stats->rx_packets += sstats->rx_packets;
3645 stats->rx_packets += sstats->rx_packets; 3638 stats->rx_bytes += sstats->rx_bytes;
3646 stats->rx_bytes += sstats->rx_bytes; 3639 stats->rx_errors += sstats->rx_errors;
3647 stats->rx_errors += sstats->rx_errors; 3640 stats->rx_dropped += sstats->rx_dropped;
3648 stats->rx_dropped += sstats->rx_dropped; 3641
3649 3642 stats->tx_packets += sstats->tx_packets;
3650 stats->tx_packets += sstats->tx_packets; 3643 stats->tx_bytes += sstats->tx_bytes;
3651 stats->tx_bytes += sstats->tx_bytes; 3644 stats->tx_errors += sstats->tx_errors;
3652 stats->tx_errors += sstats->tx_errors; 3645 stats->tx_dropped += sstats->tx_dropped;
3653 stats->tx_dropped += sstats->tx_dropped; 3646
3654 3647 stats->multicast += sstats->multicast;
3655 stats->multicast += sstats->multicast; 3648 stats->collisions += sstats->collisions;
3656 stats->collisions += sstats->collisions; 3649
3657 3650 stats->rx_length_errors += sstats->rx_length_errors;
3658 stats->rx_length_errors += sstats->rx_length_errors; 3651 stats->rx_over_errors += sstats->rx_over_errors;
3659 stats->rx_over_errors += sstats->rx_over_errors; 3652 stats->rx_crc_errors += sstats->rx_crc_errors;
3660 stats->rx_crc_errors += sstats->rx_crc_errors; 3653 stats->rx_frame_errors += sstats->rx_frame_errors;
3661 stats->rx_frame_errors += sstats->rx_frame_errors; 3654 stats->rx_fifo_errors += sstats->rx_fifo_errors;
3662 stats->rx_fifo_errors += sstats->rx_fifo_errors; 3655 stats->rx_missed_errors += sstats->rx_missed_errors;
3663 stats->rx_missed_errors += sstats->rx_missed_errors; 3656
3664 3657 stats->tx_aborted_errors += sstats->tx_aborted_errors;
3665 stats->tx_aborted_errors += sstats->tx_aborted_errors; 3658 stats->tx_carrier_errors += sstats->tx_carrier_errors;
3666 stats->tx_carrier_errors += sstats->tx_carrier_errors; 3659 stats->tx_fifo_errors += sstats->tx_fifo_errors;
3667 stats->tx_fifo_errors += sstats->tx_fifo_errors; 3660 stats->tx_heartbeat_errors += sstats->tx_heartbeat_errors;
3668 stats->tx_heartbeat_errors += sstats->tx_heartbeat_errors; 3661 stats->tx_window_errors += sstats->tx_window_errors;
3669 stats->tx_window_errors += sstats->tx_window_errors;
3670 }
3671 } 3662 }
3672 3663
3673 read_unlock_bh(&bond->lock); 3664 read_unlock_bh(&bond->lock);
diff --git a/drivers/net/pppox.c b/drivers/net/pppox.c
index 3f8115db4d54..f3e47d0c2b3c 100644
--- a/drivers/net/pppox.c
+++ b/drivers/net/pppox.c
@@ -31,6 +31,7 @@
31#include <linux/ppp_defs.h> 31#include <linux/ppp_defs.h>
32#include <linux/if_ppp.h> 32#include <linux/if_ppp.h>
33#include <linux/ppp_channel.h> 33#include <linux/ppp_channel.h>
34#include <linux/kmod.h>
34 35
35#include <net/sock.h> 36#include <net/sock.h>
36 37
@@ -114,6 +115,13 @@ static int pppox_create(struct socket *sock, int protocol)
114 goto out; 115 goto out;
115 116
116 rc = -EPROTONOSUPPORT; 117 rc = -EPROTONOSUPPORT;
118#ifdef CONFIG_KMOD
119 if (!pppox_protos[protocol]) {
120 char buffer[32];
121 sprintf(buffer, "pppox-proto-%d", protocol);
122 request_module(buffer);
123 }
124#endif
117 if (!pppox_protos[protocol] || 125 if (!pppox_protos[protocol] ||
118 !try_module_get(pppox_protos[protocol]->owner)) 126 !try_module_get(pppox_protos[protocol]->owner))
119 goto out; 127 goto out;