platform/kernel/kernel-mfld-blackbay.git
13 years agoxfrm: fix __xfrm_route_forward()
Eric Dumazet [Tue, 15 Mar 2011 22:26:43 +0000 (15:26 -0700)]
xfrm: fix __xfrm_route_forward()

This function should return 0 in case of error, 1 if OK
commit 452edd598f60522 (xfrm: Return dst directly from xfrm_lookup())
got it wrong.

Reported-and-bisected-by: Michael Smith <msmith@cbnco.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Tue, 15 Mar 2011 22:15:17 +0000 (15:15 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

13 years agoMerge branch 'irq/numa' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux...
David S. Miller [Tue, 15 Mar 2011 22:06:35 +0000 (15:06 -0700)]
Merge branch 'irq/numa' of git://git./linux/kernel/git/tip/linux-2.6-tip

13 years agobe2net: Fix UDP packet detected status in RX compl
Padmanabh Ratnakar [Tue, 15 Mar 2011 21:57:09 +0000 (14:57 -0700)]
be2net: Fix UDP packet detected status in RX compl

Status of UDP packet detection not getting populated in RX completion
structure. This is required in csum_passed() routine.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoPhonet: fix aligned-mode pipe socket buffer header reserve
Rémi Denis-Courmont [Tue, 15 Mar 2011 21:55:49 +0000 (14:55 -0700)]
Phonet: fix aligned-mode pipe socket buffer header reserve

When the pipe uses aligned-mode data packets, we must reserve 4 bytes
instead of 3 for the pipe protocol header. Otherwise the Phonet header
would not be aligned, resulting in potentially corrupted headers with
later unaligned memory writes.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetxen: support for GbE port settings
Sony Chacko [Tue, 15 Mar 2011 21:54:55 +0000 (14:54 -0700)]
netxen: support for GbE port settings

o Enable setting speed and auto negotiation parameters for GbE ports.
o Hardware do not support half duplex setting currently.

David Miller:
Amit please update your patch to silently reject link setting
attempts that are unsupported by the device.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosmsc911x: Fix build error when SMSC_TRACE() used
Jeongtae Park [Tue, 15 Mar 2011 21:52:48 +0000 (14:52 -0700)]
smsc911x: Fix build error when SMSC_TRACE() used

This patch fixes build error when SMSC_TRACE() used.

Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Tue, 15 Mar 2011 21:50:09 +0000 (14:50 -0700)]
Merge branch 'master' of /linux/kernel/git/jkirsher/net-next-2.6

13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Tue, 15 Mar 2011 20:57:18 +0000 (13:57 -0700)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next-2.6

13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
David S. Miller [Tue, 15 Mar 2011 20:03:27 +0000 (13:03 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-next-2.6

Conflicts:
Documentation/feature-removal-schedule.txt

13 years agonetfilter: xt_addrtype: ipv6 support
Florian Westphal [Tue, 15 Mar 2011 19:17:44 +0000 (20:17 +0100)]
netfilter: xt_addrtype: ipv6 support

The kernel will refuse certain types that do not work in ipv6 mode.
We can then add these features incrementally without risk of userspace
breakage.

Signed-off-by: Florian Westphal <fwestphal@astaro.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: ipt_addrtype: rename to xt_addrtype
Florian Westphal [Tue, 15 Mar 2011 19:16:20 +0000 (20:16 +0100)]
netfilter: ipt_addrtype: rename to xt_addrtype

Followup patch will add ipv6 support.

ipt_addrtype.h is retained for compatibility reasons, but no longer used
by the kernel.

Signed-off-by: Florian Westphal <fwestphal@astaro.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Tue, 15 Mar 2011 18:16:48 +0000 (14:16 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6 into for-davem

13 years agoipv6: netfilter: ip6_tables: fix infoleak to userspace
Vasiliy Kulikov [Tue, 15 Mar 2011 12:37:13 +0000 (13:37 +0100)]
ipv6: netfilter: ip6_tables: fix infoleak to userspace

Structures ip6t_replace, compat_ip6t_replace, and xt_get_revision are
copied from userspace.  Fields of these structs that are
zero-terminated strings are not checked.  When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
information is leaked to userspace via argument of spawned modprobe
process.

The first bug was introduced before the git epoch;  the second was
introduced in 3bc3fe5e (v2.6.25-rc1);  the third is introduced by
6b7d31fc (v2.6.15-rc1).  To trigger the bug one should have
CAP_NET_ADMIN.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: ip_tables: fix infoleak to userspace
Vasiliy Kulikov [Tue, 15 Mar 2011 12:36:05 +0000 (13:36 +0100)]
netfilter: ip_tables: fix infoleak to userspace

Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace.  Fields of these structs that are
zero-terminated strings are not checked.  When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
information is leaked to userspace via argument of spawned modprobe
process.

The first and the third bugs were introduced before the git epoch; the
second was introduced in 2722971c (v2.6.17-rc1).  To trigger the bug
one should have CAP_NET_ADMIN.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: arp_tables: fix infoleak to userspace
Vasiliy Kulikov [Tue, 15 Mar 2011 12:35:21 +0000 (13:35 +0100)]
netfilter: arp_tables: fix infoleak to userspace

Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace.  Fields of these structs that are
zero-terminated strings are not checked.  When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
information is leaked to userspace via argument of spawned modprobe
process.

The first bug was introduced before the git epoch;  the second is
introduced by 6b7d31fc (v2.6.15-rc1);  the third is introduced by
6b7d31fc (v2.6.15-rc1).  To trigger the bug one should have
CAP_NET_ADMIN.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: xt_connlimit: remove connlimit_rnd_inited
Changli Gao [Tue, 15 Mar 2011 12:26:32 +0000 (13:26 +0100)]
netfilter: xt_connlimit: remove connlimit_rnd_inited

A potential race condition when generating connlimit_rnd is also fixed.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: xt_connlimit: use hlist instead
Changli Gao [Tue, 15 Mar 2011 12:25:42 +0000 (13:25 +0100)]
netfilter: xt_connlimit: use hlist instead

The header of hlist is smaller than list.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: xt_connlimit: use kmalloc() instead of kzalloc()
Changli Gao [Tue, 15 Mar 2011 12:24:56 +0000 (13:24 +0100)]
netfilter: xt_connlimit: use kmalloc() instead of kzalloc()

All the members are initialized after kzalloc().

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: xt_connlimit: fix daddr connlimit in SNAT scenario
Changli Gao [Tue, 15 Mar 2011 12:23:28 +0000 (13:23 +0100)]
netfilter: xt_connlimit: fix daddr connlimit in SNAT scenario

We use the reply tuples when limiting the connections by the destination
addresses, however, in SNAT scenario, the final reply tuples won't be
ready until SNAT is done in POSTROUING or INPUT chain, and the following
nf_conntrack_find_get() in count_tem() will get nothing, so connlimit
can't work as expected.

In this patch, the original tuples are always used, and an additional
member addr is appended to save the address in either end.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agoigb: Add messaging for thermal sensor events on i350 devices
Carolyn Wyborny [Sat, 12 Mar 2011 08:59:47 +0000 (08:59 +0000)]
igb: Add messaging for thermal sensor events on i350 devices

This feature adds messaging to the link status change to notify
the user if the device returned from a downshift or power off
event due to the Thermal Sensor feature in i350 parts. Feature
is only available on internal copper ports.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigb: fix hw timestamping
Anders Berggren [Fri, 4 Feb 2011 07:32:32 +0000 (07:32 +0000)]
igb: fix hw timestamping

Hardware timestamping for Intel 82580 didn't work in either 2.6.36 or
2.6.37. Comparing it to Intel's igb-2.4.12 I found that the
timecounter_init clock/counter initialization was done too early.

Signed-off-by: Anders Berggren <andfers@halon.se>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoxen: netfront: fix xennet_get_ethtool_stats()
Eric Dumazet [Tue, 15 Mar 2011 04:05:40 +0000 (21:05 -0700)]
xen: netfront: fix xennet_get_ethtool_stats()

commit e9a799ea4a5551d2 (xen: netfront: ethtool stats fields should be
unsigned long) made rx_gso_checksum_fixup an unsigned long.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoIPVS: Conditionally include sysctl members of struct netns_ipvs
Simon Horman [Fri, 4 Feb 2011 09:33:02 +0000 (18:33 +0900)]
IPVS: Conditionally include sysctl members of struct netns_ipvs

There is now no need to include sysctl members of struct netns_ipvs
unless CONFIG_SYSCTL is defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Add __ip_vs_control_{init,cleanup}_sysctl()
Simon Horman [Fri, 4 Feb 2011 09:33:02 +0000 (18:33 +0900)]
IPVS: Add __ip_vs_control_{init,cleanup}_sysctl()

Break out the portions of __ip_vs_control_init() and
__ip_vs_control_cleanup() where aren't necessary when
CONFIG_SYSCTL is undefined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Conditionally define and use ip_vs_lblc{r}_table
Simon Horman [Fri, 4 Feb 2011 09:33:02 +0000 (18:33 +0900)]
IPVS: Conditionally define and use ip_vs_lblc{r}_table

ip_vs_lblc_table and ip_vs_lblcr_table, and code that uses them
are unnecessary when CONFIG_SYSCTL is undefined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Minimise ip_vs_leave when CONFIG_SYSCTL is undefined
Simon Horman [Fri, 4 Feb 2011 09:33:02 +0000 (18:33 +0900)]
IPVS: Minimise ip_vs_leave when CONFIG_SYSCTL is undefined

Much of ip_vs_leave() is unnecessary if CONFIG_SYSCTL is undefined.

I tried an approach of breaking the now #ifdef'ed portions out
into a separate function. However this appeared to grow the
compiled code on x86_64 by about 200 bytes in the case where
CONFIG_SYSCTL is defined. So I have gone with the simpler though
less elegant #ifdef'ed solution for now.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Conditional ip_vs_conntrack_enabled()
Simon Horman [Fri, 4 Feb 2011 09:33:02 +0000 (18:33 +0900)]
IPVS: Conditional ip_vs_conntrack_enabled()

ip_vs_conntrack_enabled() becomes a noop when CONFIG_SYSCTL is undefined.

In preparation for not including sysctl_conntrack in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: ip_vs_todrop() becomes a noop when CONFIG_SYSCTL is undefined
Simon Horman [Fri, 4 Feb 2011 09:33:02 +0000 (18:33 +0900)]
IPVS: ip_vs_todrop() becomes a noop when CONFIG_SYSCTL is undefined

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Conditinally use sysctl_lblc{r}_expiration
Simon Horman [Fri, 4 Feb 2011 09:33:01 +0000 (18:33 +0900)]
IPVS: Conditinally use sysctl_lblc{r}_expiration

In preparation for not including sysctl_lblc{r}_expiration in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Add expire_quiescent_template()
Simon Horman [Fri, 4 Feb 2011 09:33:01 +0000 (18:33 +0900)]
IPVS: Add expire_quiescent_template()

In preparation for not including sysctl_expire_quiescent_template in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Add sysctl_expire_nodest_conn()
Simon Horman [Fri, 4 Feb 2011 09:33:01 +0000 (18:33 +0900)]
IPVS: Add sysctl_expire_nodest_conn()

In preparation for not including sysctl_expire_nodest_conn in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Add sysctl_sync_ver()
Simon Horman [Fri, 4 Feb 2011 09:33:01 +0000 (18:33 +0900)]
IPVS: Add sysctl_sync_ver()

In preparation for not including sysctl_sync_ver in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Add {sysctl_sync_threshold,period}()
Simon Horman [Fri, 4 Feb 2011 09:33:01 +0000 (18:33 +0900)]
IPVS: Add {sysctl_sync_threshold,period}()

In preparation for not including sysctl_sync_threshold in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Add sysctl_nat_icmp_send()
Simon Horman [Fri, 4 Feb 2011 09:33:01 +0000 (18:33 +0900)]
IPVS: Add sysctl_nat_icmp_send()

In preparation for not including sysctl_nat_icmp_send in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Add sysctl_snat_reroute()
Simon Horman [Fri, 4 Feb 2011 09:33:01 +0000 (18:33 +0900)]
IPVS: Add sysctl_snat_reroute()

In preparation for not including sysctl_snat_reroute in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Add ip_vs_route_me_harder()
Simon Horman [Fri, 4 Feb 2011 09:33:01 +0000 (18:33 +0900)]
IPVS: Add ip_vs_route_me_harder()

Add ip_vs_route_me_harder() to avoid repeating the same code twice.

Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoipvs: rename estimator functions
Julian Anastasov [Sun, 13 Mar 2011 23:44:28 +0000 (01:44 +0200)]
ipvs: rename estimator functions

  Rename ip_vs_new_estimator to ip_vs_start_estimator
and ip_vs_kill_estimator to ip_vs_stop_estimator to better
match their logic.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoipvs: optimize rates reading
Julian Anastasov [Sun, 13 Mar 2011 23:41:54 +0000 (01:41 +0200)]
ipvs: optimize rates reading

  Move the estimator reading from estimation_timer to user
context. ip_vs_read_estimator() will be used to decode the rate
values. As the decoded rates are not set by estimation timer
there is no need to reset them in ip_vs_zero_stats.

  There is no need ip_vs_new_estimator() to encode stats
to rates, if the destination is in trash both the stats and the
rates are inactive.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoipvs: remove unused seqcount stats
Julian Anastasov [Sun, 13 Mar 2011 23:39:18 +0000 (01:39 +0200)]
ipvs: remove unused seqcount stats

  Remove ustats_seq, IPVS_STAT_INC and IPVS_STAT_ADD
because they are not used. They were replaced with u64_stats.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoipvs: properly zero stats and rates
Julian Anastasov [Sun, 13 Mar 2011 23:37:49 +0000 (01:37 +0200)]
ipvs: properly zero stats and rates

  Currently, the new percpu counters are not zeroed and
the zero commands do not work as expected, we still show the old
sum of percpu values. OTOH, we can not reset the percpu counters
from user context without causing the incrementing to use old
and bogus values.

  So, as Eric Dumazet suggested fix that by moving all overhead
to stats reading in user context. Do not introduce overhead in
timer context (estimator) and incrementing (packet handling in
softirqs).

  The new ustats0 field holds the zero point for all
counter values, the rates always use 0 as base value as before.
When showing the values to user space just give the difference
between counters and the base values. The only drawback is that
percpu stats are not zeroed, they are accessible only from /proc
and are new interface, so it should not be a compatibility problem
as long as the sum stats are correct after zeroing.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoipvs: reorganize tot_stats
Julian Anastasov [Fri, 4 Mar 2011 10:20:35 +0000 (12:20 +0200)]
ipvs: reorganize tot_stats

  The global tot_stats contains cpustats field just like the
stats for dest and svc, so better use it to simplify the usage
in estimation_timer. As tot_stats is registered as estimator
we can remove the special ip_vs_read_cpu_stats call for
tot_stats. Fix ip_vs_read_cpu_stats to be called under
stats lock because it is still used as synchronization between
estimation timer and user context (the stats readers).

  Also, make sure ip_vs_stats_percpu_show reads properly
the u64 stats from user context.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoipvs: move struct netns_ipvs
Julian Anastasov [Fri, 4 Mar 2011 10:18:07 +0000 (12:18 +0200)]
ipvs: move struct netns_ipvs

  Remove include/net/netns/ip_vs.h because it depends on
structures from include/net/ip_vs.h. As ipvs is pointer in
struct net it is better to move struct netns_ipvs into
include/net/ip_vs.h, so that we can easily use other structures
in struct netns_ipvs.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoIPVS: Fix variable assignment in ip_vs_notrack
Jesper Juhl [Wed, 9 Mar 2011 21:55:05 +0000 (22:55 +0100)]
IPVS: Fix variable assignment in ip_vs_notrack

There's no sense to 'ct = ct = ' in ip_vs_notrack(). Just assign
nf_ct_get()'s return value directly to the pointer variable 'ct' once.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agonetfilter:ipvs: use kmemdup
Shan Wei [Mon, 7 Mar 2011 02:11:34 +0000 (10:11 +0800)]
netfilter:ipvs: use kmemdup

The semantic patch that makes this output is available
in scripts/coccinelle/api/memdup.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoipvs: remove _bh from percpu stats reading
Julian Anastasov [Fri, 4 Mar 2011 10:28:20 +0000 (12:28 +0200)]
ipvs: remove _bh from percpu stats reading

  ip_vs_read_cpu_stats is called only from timer, so
no need for _bh locks.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agoipvs: avoid lookup for fwmark 0
Julian Anastasov [Fri, 4 Mar 2011 10:26:17 +0000 (12:26 +0200)]
ipvs: avoid lookup for fwmark 0

  Restore the previous behaviour to lookup for fwmark
service only when fwmark is non-null. This saves only CPU.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
13 years agonet: dcbnl: Add IEEE app selector value definitions
Mark Rustad [Mon, 14 Mar 2011 09:01:15 +0000 (09:01 +0000)]
net: dcbnl: Add IEEE app selector value definitions

This adds defines for the app selector values currently
defined in the IEEE 802.1Qaz specification.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: dcbnl: Fix misspellings
Mark Rustad [Mon, 14 Mar 2011 09:01:08 +0000 (09:01 +0000)]
net: dcbnl: Fix misspellings

Fix a few spelling errors in dcbnl.h.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: dcbnl: Update copyright dates
Mark Rustad [Mon, 14 Mar 2011 09:01:02 +0000 (09:01 +0000)]
net: dcbnl: Update copyright dates

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomacvlan : fix checksums error when we are in bridge mode
Daniel Lezcano [Mon, 14 Mar 2011 06:08:07 +0000 (06:08 +0000)]
macvlan : fix checksums error when we are in bridge mode

When the lower device has offloading capabilities, the packets checksums
are not computed. That leads to have any macvlan port in bridge mode to
not work because the packets are dropped due to a bad checksum.

If the macvlan is in bridge mode, the packet is forwarded to another
macvlan port and reach the network stack where it looks for a checksum
but this one was not computed due to the offloading of the lower device.
In this case, we have to set the packet with CHECKSUM_UNNECESSARY
when it is forwarded to a bridged port and restore the previous value of
ip_summed when the packet goes to the lowerdev.

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Andrian Nord <nightnord@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agofcoe: correct checking for bonding
Jiri Pirko [Tue, 1 Mar 2011 20:05:35 +0000 (20:05 +0000)]
fcoe: correct checking for bonding

Check for bonding master and refuse to use that.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Acked-by: Robert Love <robert.w.love@intel.com>
Acked-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoCS89x0: Add networking support for QQ2440
Domenico Andreoli [Mon, 14 Mar 2011 03:47:07 +0000 (03:47 +0000)]
CS89x0: Add networking support for QQ2440

QQ2440 is only another non-ISA board using CS89x0. This patch adds the
minimum bits required to make QQ2440 work with CS89x0.

Signed-off-by: Domenico Andreoli <cavokz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoCS89x0: Finish transition to CS89x0_NONISA_IRQ
Domenico Andreoli [Mon, 14 Mar 2011 03:46:53 +0000 (03:46 +0000)]
CS89x0: Finish transition to CS89x0_NONISA_IRQ

CS89x0_NONISA_IRQ is selected by all those non-ISA boards which use
CS89x0. This patch only cleans the last bits left after its introduction.

Signed-off-by: Domenico Andreoli <cavokz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp_cubic: fix low utilization of CUBIC with HyStart
Sangtae Ha [Mon, 14 Mar 2011 07:52:18 +0000 (07:52 +0000)]
tcp_cubic: fix low utilization of CUBIC with HyStart

HyStart sets the initial exit point of slow start.
Suppose that HyStart exits at 0.5BDP in a BDP network and no history exists.
If the BDP of a network is large, CUBIC's initial cwnd growth may be
too conservative to utilize the link.
CUBIC increases the cwnd 20% per RTT in this case.

Signed-off-by: Sangtae Ha <sangtae.ha@gmail.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp_cubic: make the delay threshold of HyStart less sensitive
Sangtae Ha [Mon, 14 Mar 2011 07:52:17 +0000 (07:52 +0000)]
tcp_cubic: make the delay threshold of HyStart less sensitive

Make HyStart less sensitive to abrupt delay variations due to buffer bloat.

Signed-off-by: Sangtae Ha <sangtae.ha@gmail.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Reported-by: Lucas Nussbaum <lucas.nussbaum@loria.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp_cubic: enable high resolution ack time if needed
stephen hemminger [Mon, 14 Mar 2011 07:52:16 +0000 (07:52 +0000)]
tcp_cubic: enable high resolution ack time if needed

This is a refined version of an earlier patch by Lucas Nussbaum.
Cubic needs RTT values in milliseconds. If HZ < 1000 then
the values will be too coarse.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Reported-by: Lucas Nussbaum <lucas.nussbaum@loria.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp_cubic: fix clock dependency
stephen hemminger [Mon, 14 Mar 2011 07:52:15 +0000 (07:52 +0000)]
tcp_cubic: fix clock dependency

The hystart code was written with assumption that HZ=1000.
Replace the use of jiffies with bictcp_clock as a millisecond
real time clock.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Reported-by: Lucas Nussbaum <lucas.nussbaum@loria.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp_cubic: make ack train delta value a parameter
stephen hemminger [Mon, 14 Mar 2011 07:52:14 +0000 (07:52 +0000)]
tcp_cubic: make ack train delta value a parameter

Make the spacing between ACK's that indicates a train a tuneable
value like other hystart values.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp_cubic: fix comparison of jiffies
stephen hemminger [Mon, 14 Mar 2011 07:52:13 +0000 (07:52 +0000)]
tcp_cubic: fix comparison of jiffies

Jiffies wraps around therefore the correct way to compare is
to use cast to signed value.

Note: cubic is not using full jiffies value on 64 bit arch
because using full unsigned long makes struct bictcp grow too
large for the available ca_priv area.

Includes correction from Sangtae Ha to improve ack train detection.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp: fix RTT for quick packets in congestion control
stephen hemminger [Mon, 14 Mar 2011 07:52:12 +0000 (07:52 +0000)]
tcp: fix RTT for quick packets in congestion control

In the congestion control interface, the callback for each ACK
includes an estimated round trip time in microseconds.
Some algorithms need high resolution (Vegas style) but most only
need jiffie resolution.  If RTT is not accurate (like a retransmission)
-1 is used as a flag value.

When doing coarse resolution if RTT is less than a a jiffie
then 0 should be returned rather than no estimate. Otherwise algorithms
that expect good ack's to trigger slow start (like CUBIC Hystart)
will be confused.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoftmac100: use GFP_ATOMIC allocations where needed
Eric Dumazet [Mon, 14 Mar 2011 22:40:39 +0000 (15:40 -0700)]
ftmac100: use GFP_ATOMIC allocations where needed

When running in softirq context, we should use GFP_ATOMIC allocations
instead of GFP_KERNEL ones.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Tested-by: Po-Yu Chuang <ratbert@faraday-tech.com>
Acked-by: Po-Yu Chuang <ratbert@faraday-tech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: change some configurations defaults
Frank Blaschka [Mon, 14 Mar 2011 22:39:47 +0000 (15:39 -0700)]
qeth: change some configurations defaults

This patch turns on RX checksum and GRO by default. To improve
receiving performance and reduce congestion in case of network
bursts we also increase the default number of inbound buffers.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: documentation update: mailing lists.
Nicolas de Pesloüan [Sun, 13 Mar 2011 10:34:22 +0000 (10:34 +0000)]
bonding: documentation update: mailing lists.

In commit a6c36ee677607b02d8ecc88e8a12785418b88107 ("bonding: change list
contact to netdev@vger.kernel.org"), the mailing list for bonding
developpement was changed from bonding-devel to netdev.

Update the bonding documentation to reflect this change:

- bonding-devel is used for usage discussions (despite the name).
- netdev is used for developpement discussions.

Also remove the reference to the sourceforge bonding page, which is
deprecated.

Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoaf_unix: update locking comment
Daniel Baluta [Mon, 14 Mar 2011 22:25:33 +0000 (15:25 -0700)]
af_unix: update locking comment

We latch our state using a spinlock not a r/w kind of lock.

Signed-off-by: Daniel Baluta <dbaluta@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoNET: cdc-phonet, handle empty phonet header
Jiri Slaby [Sun, 13 Mar 2011 06:54:31 +0000 (06:54 +0000)]
NET: cdc-phonet, handle empty phonet header

Currently, for N 5800 XM I get:
cdc_phonet: probe of 1-6:1.10 failed with error -22

It's because phonet_header is empty. Extra altsetting looks like
there:
E 05 24 00 01 10 03 24 ab 05 24 06 0a 0b 04 24 fd  .$....$..$....$.
E 00                                               .

I don't see the header used anywhere so just check if the phonet
descriptor is there, not the structure itself.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Cc: David S. Miller <davem@davemloft.net>
Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoNET: cdc-phonet, fix stop-queue handling
Jiri Slaby [Sun, 13 Mar 2011 06:54:30 +0000 (06:54 +0000)]
NET: cdc-phonet, fix stop-queue handling

Currently there is a warning emitted by the cdc-phonet driver:
WARNING: at include/linux/netdevice.h:1557 usbpn_probe+0x3bb/0x3f0 [cdc_phonet]()
Modules linked in: ...
Pid: 5877, comm: insmod Not tainted 2.6.37.3-16-desktop #1
Call Trace:
 [<ffffffff810059b9>] dump_trace+0x79/0x340
 [<ffffffff81520fdc>] dump_stack+0x69/0x6f
 [<ffffffff810580eb>] warn_slowpath_common+0x7b/0xc0
 [<ffffffffa00254fb>] usbpn_probe+0x3bb/0x3f0 [cdc_phonet]
...
---[ end trace f5d3e02908603ab4 ]---
netif_stop_queue() cannot be called before register_netdev()

So remove netif_stop_queue from the probe funtction to avoid that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Cc: David S. Miller <davem@davemloft.net>
Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: changes for BE3 native mode support
Sathya Perla [Fri, 11 Mar 2011 02:49:26 +0000 (02:49 +0000)]
be2net: changes for BE3 native mode support

So far be2net has been using BE3 in legacy mode. It now checks for native
 mode capability and if available it sets it. In native mode, the RX_COMPL
 structure is different from that in legacy mode.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetxen: Notify firmware of Flex-10 interface down
Sony Chacko [Thu, 10 Mar 2011 23:50:02 +0000 (23:50 +0000)]
netxen: Notify firmware of Flex-10 interface down

Notify firmware when a Flex-10 interface is brought down
so that virtual connect manager can display the correct link status.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxen: netfront: ethtool stats fields should be unsigned long
Ian Campbell [Thu, 10 Mar 2011 07:04:18 +0000 (07:04 +0000)]
xen: netfront: ethtool stats fields should be unsigned long

Fixup the rx_gso_checksum_fixup field added in e0ce4af920eb to be
unsigned long as suggested by Ben Hutchings in
<1298919198.2569.14.camel@bwh-desktop>

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: skip forwarding delay if not using STP
stephen hemminger [Thu, 10 Mar 2011 05:57:04 +0000 (05:57 +0000)]
bridge: skip forwarding delay if not using STP

If Spanning Tree Protocol is not enabled, there is no good reason for
the bridge code to wait for the forwarding delay period before enabling
the link. The purpose of the forwarding delay is to allow STP to
learn about other bridges before nominating itself.

The only possible impact is that when starting up a new port
the bridge may flood a packet now, where previously it might have
seen traffic from the other host and preseeded the forwarding table.

Includes change for local variable br already available in that func.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoDavinci: Do not reset EMAC TX overruns counter on read
Thomas Lange [Wed, 9 Mar 2011 04:41:16 +0000 (04:41 +0000)]
Davinci: Do not reset EMAC TX overruns counter on read

Don't reset tx_fifo_errors when reading out current EMAC stats.
  (tx_fifo_errors shows up as TX overruns in netdev stats.)

Without this correction, the old counter value is lost every time
stats are read out.

Signed-off-by: Thomas Lange <thomas@corelatus.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agophylib: SIOCGMIIREG/SIOCSMIIREG: allow access to all mdio addresses
Peter Korsgaard [Thu, 10 Mar 2011 06:52:13 +0000 (06:52 +0000)]
phylib: SIOCGMIIREG/SIOCSMIIREG: allow access to all mdio addresses

phylib would silently ignore the phy_id argument to these ioctls and
perform the read/write with the active phydev address, whereas most
non-phylib drivers seem to allow access to all mdio addresses
(E.G. pcnet_cs).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2: Update firmware and version
Michael Chan [Mon, 14 Mar 2011 22:00:12 +0000 (15:00 -0700)]
bnx2: Update firmware and version

Update 5709 mips firmware to 6.2.1a to fix iSCSI performance
regression.  There was an unnecessary context read in the fast path
affecting performance.

Update bnx2 to 2.1.6.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Support newer version of firmware devcmd CMD_MCPU_FW_INFO
Vasanthy Kolluri [Tue, 8 Mar 2011 15:35:30 +0000 (15:35 +0000)]
enic: Support newer version of firmware devcmd CMD_MCPU_FW_INFO

This patch provides support to the newer version of firmware devcmd CMD_MCPU_FW_INFO
that returns additional information (ASIC type and revision) about the underlying hardware.
This knowledge is required by the driver to implement any hardware specific features.

Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocan: wrong index used in inner loop
roel kluin [Tue, 8 Mar 2011 09:52:55 +0000 (09:52 +0000)]
can: wrong index used in inner loop

Index i was already used in the outer loop.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: control carrier based on ports online
stephen hemminger [Mon, 7 Mar 2011 08:34:06 +0000 (08:34 +0000)]
bridge: control carrier based on ports online

This makes the bridge device behave like a physical device.
In earlier releases the bridge always asserted carrier. This
changes the behavior so that bridge device carrier is on only
if one or more ports are in the forwarding state. This
should help IPv6 autoconfiguration, DHCP, and routing daemons.

I did brief testing with Network and Virt manager and they
seem fine, but since this changes behavior of bridge, it should
wait until net-next (2.6.39).

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Tested-By: Adam Majer <adamm@zombino.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodrivers/net: fix build warnings with CONFIG_PM_SLEEP disabled
Michel Lespinasse [Sun, 6 Mar 2011 16:14:50 +0000 (16:14 +0000)]
drivers/net: fix build warnings with CONFIG_PM_SLEEP disabled

This fixes a couple of build warnings when CONFIG_PM is enabled but
CONFIG_PM_SLEEP is disabled. Applies on top of v2.6.38-rc7 - I know it's
late, but it would be great if v2.6.38 could compile without warnings!

Signed-off-by: Michel Lespinasse <walken@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: add set_mdio_gate in bb_info
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:55 +0000 (21:59 +0000)]
net: sh_eth: add set_mdio_gate in bb_info

The SH7757's ETHER and GETHER use common MDIO pin. The MDIO pin is
selected by specific register. So this patch adds new interface in
bb_info, and when the sh_eth driver use the mdio, the register can
be changed by the function.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: add support for SH7757's GETHER
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:49 +0000 (21:59 +0000)]
net: sh_eth: add support for SH7757's GETHER

The SH7757 have GETHER and ETHER both. This patch supports them.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: modify the PHY_INTERFACE_MODE
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:45 +0000 (21:59 +0000)]
net: sh_eth: modify the PHY_INTERFACE_MODE

The previous code had hardcoded the PHY_INTERFACE_MODE_MII of phy_connect.
So some Gigabit PHYs will not behave correctly.
The patch adds the phy_interface in sh_eth_plat_data, so we can select
the phy interface.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: remove almost #ifdef of SH7763
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:38 +0000 (21:59 +0000)]
net: sh_eth: remove almost #ifdef of SH7763

The SH7763 has GETHER. So the specification of some registers differs than
other CPUs. This patch removes almost #ifdef of CONFIG_CPU_SUBTYPE_SH7763.
Then we are able to add other CPU's GETHER easily.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: remove the SH_TSU_ADDR
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:34 +0000 (21:59 +0000)]
net: sh_eth: remove the SH_TSU_ADDR

The defination is hardcoded in this driver for some CPUs. This patch
modifies to get resource of TSU address from platform_device.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: modify the definitions of register
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:26 +0000 (21:59 +0000)]
net: sh_eth: modify the definitions of register

The previous code cannot handle the ETHER and GETHER both as same time
because the definitions of register was hardcoded.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'tipc-Mar14-2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg...
David S. Miller [Mon, 14 Mar 2011 20:49:53 +0000 (13:49 -0700)]
Merge branch 'tipc-Mar14-2011' of git://git./linux/kernel/git/paulg/net-next-2.6

13 years agopktgen: bug fix in transmission headers with frags=0
Daniel Turull [Mon, 14 Mar 2011 20:47:40 +0000 (13:47 -0700)]
pktgen: bug fix in transmission headers with frags=0

(bug introduced by commit 26ad787962ef84677a48c560
(pktgen: speedup fragmented skbs)

The headers of pktgen were incorrectly added in a pktgen packet
without frags (frags=0). There was an offset in the pktgen headers.

The cause was in reusing the pgh variable as a return variable in skb_put
when adding the payload to the skb.

Signed-off-by: Daniel Turull <daniel.turull@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
13 years agobnx2x: fix swap of rx-ticks and tx-ticks parameters in interrupt coalescing flow
Ariel Elior [Mon, 14 Mar 2011 20:43:22 +0000 (13:43 -0700)]
bnx2x: fix swap of rx-ticks and tx-ticks parameters in interrupt coalescing flow

Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoath9k: fix aggregation related interoperability issues
Felix Fietkau [Sat, 12 Mar 2011 00:11:28 +0000 (01:11 +0100)]
ath9k: fix aggregation related interoperability issues

Some clients seems to keep track of their reorder window even after an
aggregation session has been disabled. This causes issues if there are
still retried but not completed frames pending for the TID.
To ensure that rx does not stall in such situations, set sendbar to 1
for any frame purged from the TID queue on teardown.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix channel type recalculation with HT and non-HT interfaces
Felix Fietkau [Fri, 11 Mar 2011 20:45:51 +0000 (21:45 +0100)]
mac80211: fix channel type recalculation with HT and non-HT interfaces

When running an AP interface along with the cooked monitor interface created
by hostapd, adding an interface and deleting it again triggers a channel type
recalculation during which the (non-HT) monitor interface takes precedence
over the HT AP interface, thus causing the channel type to be set to non-HT.
Fix this by ensuring that a more wide channel type will not be overwritten
by a less wide channel type.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: improve reliability of beacon transmission and stuck beacon handling
Felix Fietkau [Fri, 11 Mar 2011 20:38:20 +0000 (21:38 +0100)]
ath9k: improve reliability of beacon transmission and stuck beacon handling

ath9k calls ath9k_hw_stoptxdma every time it sends a beacon, however there
is not much point in doing that if the previous beacon and mcast traffic
went out properly. On AR9380, calling that function too often can result
in an increase of stuck beacons due to differences in the handling of the
queue enable/disable functionality.

With this patch, the queue will only be explicitly stopped if the previous
data frames were not sent successfully. With the beacon code being the
only remaining user of ath9k_hw_stoptxdma, this function can be simplified
in order to remove the now pointless attempts at waiting for transmission
completion, which would never happen at this point due to the different
method of tx scheduling of the beacon queue.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix the .flush driver op implementation
Felix Fietkau [Fri, 11 Mar 2011 20:38:19 +0000 (21:38 +0100)]
ath9k: fix the .flush driver op implementation

This patch simplifies the flush op and reuses ath_drain_all_txq for
flushing out pending frames if necessary. It also uses a global timeout
of 200ms instead of the per-queue 60ms timeout.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix stopping tx dma on reset
Felix Fietkau [Fri, 11 Mar 2011 20:38:18 +0000 (21:38 +0100)]
ath9k: fix stopping tx dma on reset

In some situations, stopping Tx DMA frequently fails, leading to messages
like this:

ath: Failed to stop TX DMA in 100 msec after killing last frame
ath: Failed to stop TX DMA!

This patch uses a few MAC features to abort DMA globally instead of iterating
over all hardware queues and attempting to stop them individually.
Not only is that faster and works with a shorter timeout, it also makes the
process much more reliable.

With this change, I can no longer trigger these messages on AR9380,
and on AR9280 they become much more rare.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: fix REG_SET_BIT and REG_CLR_BIT for multiple bits
Felix Fietkau [Fri, 11 Mar 2011 20:38:17 +0000 (21:38 +0100)]
ath9k_hw: fix REG_SET_BIT and REG_CLR_BIT for multiple bits

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Shortcut minstrel_ht rate setup for non-MRR capable devices
Helmut Schaa [Wed, 9 Mar 2011 09:02:38 +0000 (10:02 +0100)]
mac80211: Shortcut minstrel_ht rate setup for non-MRR capable devices

Devices without multi rate retry support won't be able to use all rates
as specified by mintrel_ht. Hence, we can simply skip setting up further
rates as the devices will only use the first one.

Also add a special case for devices with only two possible tx rates. We
use sample_rate -> max_prob_rate for sampling and max_tp_rate ->
max_prob_rate by default.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonetfilter: nf_conntrack: fix sysctl memory leak
Stephen Hemminger [Mon, 14 Mar 2011 18:20:44 +0000 (19:20 +0100)]
netfilter: nf_conntrack: fix sysctl memory leak

Message in log because sysctl table was not empty at netns exit
 WARNING: at net/sysctl_net.c:84 sysctl_net_exit+0x2a/0x2c()

Instrumenting showed that the nf_conntrack_timestamp was the entry
that was being created but not cleared.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: x_tables: return -ENOENT for non-existant matches/targets
Patrick McHardy [Mon, 14 Mar 2011 18:11:44 +0000 (19:11 +0100)]
netfilter: x_tables: return -ENOENT for non-existant matches/targets

As Stephen correctly points out, we need to return -ENOENT in
xt_find_match()/xt_find_target() after the patch "netfilter: x_tables:
misuse of try_then_request_module" in order to properly indicate
a non-existant module to the caller.

Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agotipc: delete extra semicolon blocking node deletion
Paul Gortmaker [Mon, 14 Mar 2011 16:03:44 +0000 (12:03 -0400)]
tipc: delete extra semicolon blocking node deletion

Remove bogus semicolon only recently introduced in 34e46258cb9f5
that blocks cleanup of nodes for N>1 on shutdown.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoinetpeer: should use call_rcu() variant
Eric Dumazet [Mon, 14 Mar 2011 06:22:23 +0000 (23:22 -0700)]
inetpeer: should use call_rcu() variant

After commit 7b46ac4e77f3224a (inetpeer: Don't disable BH for initial
fast RCU lookup.), we should use call_rcu() to wait proper RCU grace
period.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Add user interface for esn and big anti-replay windows
Steffen Klassert [Tue, 8 Mar 2011 00:10:27 +0000 (00:10 +0000)]
xfrm: Add user interface for esn and big anti-replay windows

This patch adds a netlink based user interface to configure
esn and big anti-replay windows. The new netlink attribute
XFRMA_REPLAY_ESN_VAL is used to configure the new implementation.
If the XFRM_STATE_ESN flag is set, we use esn and support for big
anti-replay windows for the configured state. If this flag is not
set we use the new implementation with 32 bit sequence numbers.
A big anti-replay window can be configured in this case anyway.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Add support for IPsec extended sequence numbers
Steffen Klassert [Tue, 8 Mar 2011 00:09:51 +0000 (00:09 +0000)]
xfrm: Add support for IPsec extended sequence numbers

This patch adds support for IPsec extended sequence numbers (esn)
as defined in RFC 4303. The bits to manage the anti-replay window
are based on a patch from Alex Badea.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>