diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-27 14:16:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-27 14:16:27 -0400 |
commit | 10799db60cbc4f990dd69eb49883477095c66af7 (patch) | |
tree | b87ac6acaa48f4f59f5d6a0b11490105876952e1 /net/core | |
parent | aaab184276a6e20834f63735d433f94ef52a0497 (diff) | |
parent | c5c177b4aca83338781e72be2e6dd1601c560cb3 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
net: Kill ratelimit.h dependency in linux/net.h
net: Add linux/sysctl.h includes where needed.
net: Kill ether_table[] declaration.
inetpeer: fix race in unused_list manipulations
atm: expose ATM device index in sysfs
IPVS: bug in ip_vs_ftp, same list heaad used in all netns.
bug.h: Move ratelimit warn interfaces to ratelimit.h
bonding: cleanup module option descriptions
net:8021q:vlan.c Fix pr_info to just give the vlan fullname and version.
net: davinci_emac: fix dev_err use at probe
can: convert to %pK for kptr_restrict support
net: fix ETHTOOL_SFEATURES compatibility with old ethtool_ops.set_flags
netfilter: Fix several warnings in compat_mtw_from_user().
netfilter: ipset: fix ip_set_flush return code
netfilter: ipset: remove unused variable from type_pf_tdel()
netfilter: ipset: Use proper timeout value to jiffies conversion
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/ethtool.c | 25 | ||||
-rw-r--r-- | net/core/filter.c | 1 | ||||
-rw-r--r-- | net/core/sysctl_net_core.c | 1 | ||||
-rw-r--r-- | net/core/utils.c | 1 |
4 files changed, 27 insertions, 1 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 84e7304532e6..fd14116ad7f0 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
@@ -233,6 +233,29 @@ static int ethtool_set_feature_compat(struct net_device *dev, | |||
233 | return 1; | 233 | return 1; |
234 | } | 234 | } |
235 | 235 | ||
236 | static int ethtool_set_flags_compat(struct net_device *dev, | ||
237 | int (*legacy_set)(struct net_device *, u32), | ||
238 | struct ethtool_set_features_block *features, u32 mask) | ||
239 | { | ||
240 | u32 value; | ||
241 | |||
242 | if (!legacy_set) | ||
243 | return 0; | ||
244 | |||
245 | if (!(features[0].valid & mask)) | ||
246 | return 0; | ||
247 | |||
248 | value = dev->features & ~features[0].valid; | ||
249 | value |= features[0].requested; | ||
250 | |||
251 | features[0].valid &= ~mask; | ||
252 | |||
253 | if (legacy_set(dev, value & mask) < 0) | ||
254 | netdev_info(dev, "Legacy flags change failed\n"); | ||
255 | |||
256 | return 1; | ||
257 | } | ||
258 | |||
236 | static int ethtool_set_features_compat(struct net_device *dev, | 259 | static int ethtool_set_features_compat(struct net_device *dev, |
237 | struct ethtool_set_features_block *features) | 260 | struct ethtool_set_features_block *features) |
238 | { | 261 | { |
@@ -249,7 +272,7 @@ static int ethtool_set_features_compat(struct net_device *dev, | |||
249 | features, NETIF_F_ALL_TSO); | 272 | features, NETIF_F_ALL_TSO); |
250 | compat |= ethtool_set_feature_compat(dev, dev->ethtool_ops->set_rx_csum, | 273 | compat |= ethtool_set_feature_compat(dev, dev->ethtool_ops->set_rx_csum, |
251 | features, NETIF_F_RXCSUM); | 274 | features, NETIF_F_RXCSUM); |
252 | compat |= ethtool_set_feature_compat(dev, dev->ethtool_ops->set_flags, | 275 | compat |= ethtool_set_flags_compat(dev, dev->ethtool_ops->set_flags, |
253 | features, flags_dup_features); | 276 | features, flags_dup_features); |
254 | 277 | ||
255 | return compat; | 278 | return compat; |
diff --git a/net/core/filter.c b/net/core/filter.c index 0e3622f1dcb1..36f975fa87cb 100644 --- a/net/core/filter.c +++ b/net/core/filter.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/unaligned.h> | 38 | #include <asm/unaligned.h> |
39 | #include <linux/filter.h> | 39 | #include <linux/filter.h> |
40 | #include <linux/reciprocal_div.h> | 40 | #include <linux/reciprocal_div.h> |
41 | #include <linux/ratelimit.h> | ||
41 | 42 | ||
42 | /* No hurry in this branch */ | 43 | /* No hurry in this branch */ |
43 | static void *__load_pointer(const struct sk_buff *skb, int k, unsigned int size) | 44 | static void *__load_pointer(const struct sk_buff *skb, int k, unsigned int size) |
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index a829e3f60aeb..77a65f031488 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <net/ip.h> | 18 | #include <net/ip.h> |
19 | #include <net/sock.h> | 19 | #include <net/sock.h> |
20 | #include <net/net_ratelimit.h> | ||
20 | 21 | ||
21 | #ifdef CONFIG_RPS | 22 | #ifdef CONFIG_RPS |
22 | static int rps_sock_flow_sysctl(ctl_table *table, int write, | 23 | static int rps_sock_flow_sysctl(ctl_table *table, int write, |
diff --git a/net/core/utils.c b/net/core/utils.c index 2012bc797f9c..386e263f6066 100644 --- a/net/core/utils.c +++ b/net/core/utils.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/ratelimit.h> | 27 | #include <linux/ratelimit.h> |
28 | 28 | ||
29 | #include <net/sock.h> | 29 | #include <net/sock.h> |
30 | #include <net/net_ratelimit.h> | ||
30 | 31 | ||
31 | #include <asm/byteorder.h> | 32 | #include <asm/byteorder.h> |
32 | #include <asm/system.h> | 33 | #include <asm/system.h> |