diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-25 15:50:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-25 15:50:32 -0700 |
commit | 06dbbfef8296d6dc23e5d8030a0e8e7b20df3b7c (patch) | |
tree | 9f93c1a56082d80e5741bb2a231e93314efbcd7e /net/core | |
parent | 22fa8d59be28affbecc6ae87abf528aebeebff24 (diff) | |
parent | 03cf786c4e83dba404ad23ca58f49147ae52dffd (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
[IPV4]: Explicitly call fib_get_table() in fib_frontend.c
[NET]: Use BUILD_BUG_ON in net/core/flowi.c
[NET]: Remove in-code externs for some functions from net/core/dev.c
[NET]: Don't declare extern variables in net/core/sysctl_net_core.c
[TCP]: Remove unneeded implicit type cast when calling tcp_minshall_update()
[NET]: Treat the sign of the result of skb_headroom() consistently
[9P]: Fix missing unlock before return in p9_mux_poll_start
[PKT_SCHED]: Fix sch_prio.c build with CONFIG_NETDEVICES_MULTIQUEUE
[IPV4] ip_gre: sendto/recvfrom NBMA address
[SCTP]: Consolidate sctp_ulpq_renege_xxx functions
[NETLINK]: Fix ACK processing after netlink_dump_start
[VLAN]: MAINTAINERS update
[DCCP]: Implement SIOCINQ/FIONREAD
[NET]: Validate device addr prior to interface-up
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 20 | ||||
-rw-r--r-- | net/core/flow.c | 5 | ||||
-rw-r--r-- | net/core/net-sysfs.c | 2 | ||||
-rw-r--r-- | net/core/net-sysfs.h | 8 | ||||
-rw-r--r-- | net/core/sysctl_net_core.c | 17 |
5 files changed, 24 insertions, 28 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 872658927e4..f1647d7dd14 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -120,6 +120,8 @@ #include <linux/ctype.h> #include <linux/if_arp.h> +#include "net-sysfs.h" + /* * The list of packet types we will receive (as opposed to discard) * and the routines to invoke. @@ -249,10 +251,6 @@ static RAW_NOTIFIER_HEAD(netdev_chain); DEFINE_PER_CPU(struct softnet_data, softnet_data); -extern int netdev_kobject_init(void); -extern int netdev_register_kobject(struct net_device *); -extern void netdev_unregister_kobject(struct net_device *); - #ifdef CONFIG_DEBUG_LOCK_ALLOC /* * register_netdevice() inits dev->_xmit_lock and sets lockdep class @@ -1007,17 +1005,20 @@ int dev_open(struct net_device *dev) * Call device private open method */ set_bit(__LINK_STATE_START, &dev->state); - if (dev->open) { + + if (dev->validate_addr) + ret = dev->validate_addr(dev); + + if (!ret && dev->open) ret = dev->open(dev); - if (ret) - clear_bit(__LINK_STATE_START, &dev->state); - } /* * If it went open OK then: */ - if (!ret) { + if (ret) + clear_bit(__LINK_STATE_START, &dev->state); + else { /* * Set the flags. */ @@ -1038,6 +1039,7 @@ int dev_open(struct net_device *dev) */ call_netdevice_notifiers(NETDEV_UP, dev); } + return ret; } diff --git a/net/core/flow.c b/net/core/flow.c index 0ab5234b17d..3ed2b4b1d6d 100644 --- a/net/core/flow.c +++ b/net/core/flow.c @@ -142,8 +142,6 @@ typedef u64 flow_compare_t; typedef u32 flow_compare_t; #endif -extern void flowi_is_missized(void); - /* I hear what you're saying, use memcmp. But memcmp cannot make * important assumptions that we can here, such as alignment and * constant size. @@ -153,8 +151,7 @@ static int flow_key_compare(struct flowi *key1, struct flowi *key2) flow_compare_t *k1, *k1_lim, *k2; const int n_elem = sizeof(struct flowi) / sizeof(flow_compare_t); - if (sizeof(struct flowi) % sizeof(flow_compare_t)) - flowi_is_missized(); + BUILD_BUG_ON(sizeof(struct flowi) % sizeof(flow_compare_t)); k1 = (flow_compare_t *) key1; k1_lim = k1 + n_elem; diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 6628e457ddc..61ead1d1113 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -18,6 +18,8 @@ #include <linux/wireless.h> #include <net/iw_handler.h> +#include "net-sysfs.h" + #ifdef CONFIG_SYSFS static const char fmt_hex[] = "%#x\n"; static const char fmt_long_hex[] = "%#lx\n"; diff --git a/net/core/net-sysfs.h b/net/core/net-sysfs.h new file mode 100644 index 00000000000..f5f108db392 --- /dev/null +++ b/net/core/net-sysfs.h @@ -0,0 +1,8 @@ +#ifndef __NET_SYSFS_H__ +#define __NET_SYSFS_H__ + +int netdev_kobject_init(void); +int netdev_register_kobject(struct net_device *); +void netdev_unregister_kobject(struct net_device *); + +#endif diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index 6d5ea976204..113cc728dc3 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c @@ -9,25 +9,12 @@ #include <linux/sysctl.h> #include <linux/module.h> #include <linux/socket.h> +#include <linux/netdevice.h> #include <net/sock.h> +#include <net/xfrm.h> #ifdef CONFIG_SYSCTL -extern int netdev_max_backlog; -extern int weight_p; - -extern __u32 sysctl_wmem_max; -extern __u32 sysctl_rmem_max; - -extern int sysctl_core_destroy_delay; - -#ifdef CONFIG_XFRM -extern u32 sysctl_xfrm_aevent_etime; -extern u32 sysctl_xfrm_aevent_rseqth; -extern int sysctl_xfrm_larval_drop; -extern u32 sysctl_xfrm_acq_expires; -#endif - ctl_table core_table[] = { #ifdef CONFIG_NET { |