pandora-kernel.git
13 years agoperf script: Use the default lost event handler
Arnaldo Carvalho de Melo [Tue, 4 Jan 2011 18:27:30 +0000 (16:27 -0200)]
perf script: Use the default lost event handler

That already does what was being done here. The warning is now unconditionally
given by __perf_session__process_pipe_events, just like for non pipe processing.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agoperf session: Warn about errors when processing pipe events too
Arnaldo Carvalho de Melo [Tue, 4 Jan 2011 18:25:15 +0000 (16:25 -0200)]
perf session: Warn about errors when processing pipe events too

Just like we do at __perf_session__process_events

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agoperf tools: Fix perf_event.h header usage
Stephane Eranian [Tue, 4 Jan 2011 14:30:01 +0000 (16:30 +0200)]
perf tools: Fix perf_event.h header usage

This patch fixes the usage of the perf_event.h header file
between command modules and the supporting code in util.

It is necessary to ensure that ALL files use the SAME
perf_event.h header from the kernel source tree.

There were a couple of #include <linux/perf_event.h> mixed
with #include "../../perf_event.h".

This caused issues on some distros because of mismatch
in the layout of struct perf_event_attr. That eventually
led perf stat to segfault.

Cc: David S. Miller <davem@davemloft.net>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@gmail.com>
LKML-Reference: <4d233cf0.2308e30a.7b00.ffffc187@mx.google.com>
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agoperf test: Clarify some error reports in the open syscall test
Arnaldo Carvalho de Melo [Tue, 4 Jan 2011 12:40:08 +0000 (10:40 -0200)]
perf test: Clarify some error reports in the open syscall test

Rebooted my devel machine, first thing I ran was perf test, that expects
debugfs to be mounted, test fails. Be more clear about it.

Also add missing newlines and add more informative message when
sys_perf_event_open fails.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years ago[media] cx25821: Fix compilation breakage due to BKL dependency
Mauro Carvalho Chehab [Wed, 5 Jan 2011 15:31:15 +0000 (12:31 -0300)]
[media] cx25821: Fix compilation breakage due to BKL dependency

drivers/staging/cx25821/cx25821-video.c: In function ‘video_open’:
drivers/staging/cx25821/cx25821-video.c:817:8: error: implicit declaration of function ‘lock_kernel’
drivers/staging/cx25821/cx25821-video.c:834:9: error: implicit declaration of function ‘unlock_kernel’

This patch just adds a header with BKL function. It should be enough
to avoid compilation breakage, but, as BKL will be removed, we need
to properly fix it on a latter patch.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Reported-by: Anca Emanuel <anca.emanuel@gmail.com>
Cc: Palash Bandyopadhyay <Palash.Bandyopadhyay@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agox86, NMI: Add touch_nmi_watchdog to io_check_error delay
Huang Ying [Wed, 5 Jan 2011 03:38:09 +0000 (22:38 -0500)]
x86, NMI: Add touch_nmi_watchdog to io_check_error delay

Prevent the long delay in io_check_error making NMI watchdog
timeout.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Don Zickus <dzickus@redhat.com>
LKML-Reference: <1294198689-15447-3-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agox86: Avoid calling arch_trigger_all_cpu_backtrace() at the same time
Dongdong Deng [Wed, 5 Jan 2011 03:38:08 +0000 (22:38 -0500)]
x86: Avoid calling arch_trigger_all_cpu_backtrace() at the same time

The spin_lock_debug/rcu_cpu_stall detector uses
trigger_all_cpu_backtrace() to dump cpu backtrace.
Therefore it is possible that trigger_all_cpu_backtrace()
could be called at the same time on different CPUs, which
triggers and 'unknown reason NMI' warning. The following case
illustrates the problem:

      CPU1                    CPU2                     ...   CPU N
                       trigger_all_cpu_backtrace()
                       set "backtrace_mask" to cpu mask
                               |
generate NMI interrupts  generate NMI interrupts       ...
    \                          |                               /
     \                         |                              /

The "backtrace_mask" will be cleaned by the first NMI interrupt
at nmi_watchdog_tick(), then the following NMI interrupts
generated by other cpus's arch_trigger_all_cpu_backtrace() will
be taken as unknown reason NMI interrupts.

This patch uses a test_and_set to avoid the problem, and stop
the arch_trigger_all_cpu_backtrace() from calling to avoid
dumping a double cpu backtrace info when there is already a
trigger_all_cpu_backtrace() in progress.

Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
Reviewed-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Cc: fweisbec@gmail.com
LKML-Reference: <1294198689-15447-2-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Don Zickus <dzickus@redhat.com>
13 years agox86: Only call smp_processor_id in non-preempt cases
Don Zickus [Wed, 5 Jan 2011 03:38:07 +0000 (22:38 -0500)]
x86: Only call smp_processor_id in non-preempt cases

There are some paths that walk the die_chain with preemption on.
Make sure we are in an NMI call before we start doing anything.

This was triggered by do_general_protection calling notify_die
with DIE_GPF.

Reported-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Don Zickus <dzickus@redhat.com>
LKML-Reference: <1294198689-15447-1-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoMerge commit 'v2.6.37' into perf/core
Ingo Molnar [Wed, 5 Jan 2011 13:22:08 +0000 (14:22 +0100)]
Merge commit 'v2.6.37' into perf/core

Merge reason: Add the final .37 tree.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agosched: Change wait_for_completion_*_timeout() to return a signed long
NeilBrown [Wed, 5 Jan 2011 01:50:16 +0000 (12:50 +1100)]
sched: Change wait_for_completion_*_timeout() to return a signed long

wait_for_completion_*_timeout() can return:

   0: if the wait timed out
 -ve: if the wait was interrupted
 +ve: if the completion was completed.

As they currently return an 'unsigned long', the last two cases
are not easily distinguished which can easily result in buggy
code, as is the case for the recently added
wait_for_completion_interruptible_timeout() call in
net/sunrpc/cache.c

So change them both to return 'long'.  As MAX_SCHEDULE_TIMEOUT
is LONG_MAX, a large +ve return value should never overflow.

Signed-off-by: NeilBrown <neilb@suse.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: J. Bruce Fields <bfields@fieldses.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <20110105125016.64ccab0e@notabene.brown>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoMerge commit 'v2.6.37' into sched/core
Ingo Molnar [Wed, 5 Jan 2011 13:14:42 +0000 (14:14 +0100)]
Merge commit 'v2.6.37' into sched/core

Merge reason: Merge the final .37 tree.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agox86: Fix APIC ID sizing bug on larger systems, clean up MAX_APICS confusion
Yinghai Lu [Wed, 5 Jan 2011 00:38:52 +0000 (16:38 -0800)]
x86: Fix APIC ID sizing bug on larger systems, clean up MAX_APICS confusion

Found one x2apic pre-enabled system, x2apic_mode suddenly get
corrupted after register some cpus, when compiled
CONFIG_NR_CPUS=255 instead of 512.

It turns out that generic_processor_info() ==> phyid_set(apicid,
phys_cpu_present_map) causes the problem.

phys_cpu_present_map is sized by MAX_APICS bits, and pre-enabled
system some cpus have an apic id > 255.

The variable after phys_cpu_present_map may get corrupted
silently:

 ffffffff828e8420 B phys_cpu_present_map
 ffffffff828e8440 B apic_verbosity
 ffffffff828e8444 B local_apic_timer_c2_ok
 ffffffff828e8448 B disable_apic
 ffffffff828e844c B x2apic_mode
 ffffffff828e8450 B x2apic_disabled
 ffffffff828e8454 B num_processors
 ...

Actually phys_cpu_present_map is referenced via apic id, instead
index. We should use MAX_LOCAL_APIC instead MAX_APICS.

For 64-bit it will be 32768 in all cases. BSS will increase by 4k bytes
on 64-bit:

text data bss dec filename
21696943 4193748 12787712 38678403 vmlinux.before
21696943 4193748 12791808 38682499 vmlinux.after

No change on 32bit.

Finally we can remove MAX_APCIS that was rather confusing.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: H. Peter Anvin <hpa@linux.intel.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
LKML-Reference: <4D23BD9C.3070102@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoARM: vexpress: add sched_clock() for Versatile Express
Russell King [Wed, 15 Dec 2010 21:58:50 +0000 (21:58 +0000)]
ARM: vexpress: add sched_clock() for Versatile Express

Add a sched_clock() implementation to Versatile Express using the new
sched_clock() infrastructure for extending 32bit counters to full
64-bit nanoseconds.

Tested-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoMerge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable
Russell King [Wed, 5 Jan 2011 10:23:38 +0000 (10:23 +0000)]
Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable

13 years agoMerge branch 'common/fbdev-mipi' of master.kernel.org:/pub/scm/linux/kernel/git/letha...
Paul Mundt [Wed, 5 Jan 2011 08:30:20 +0000 (17:30 +0900)]
Merge branch 'common/fbdev-mipi' of /linux/kernel/git/lethal/sh-2.6

13 years agofbdev: sh_mipi_dsi: use platform provided register layout and values
Guennadi Liakhovetski [Wed, 29 Dec 2010 08:12:29 +0000 (08:12 +0000)]
fbdev: sh_mipi_dsi: use platform provided register layout and values

Different sh-mobile SoCs have variations in their MIPI DSI register layouts,
besides, different LCD panels require different configuration parameters. This
patch switches the driver to use platform-provided MIPI DSI parameters.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoARM: mach-shmobile: specify sh7372 MIPI DSI register layout
Guennadi Liakhovetski [Wed, 29 Dec 2010 08:12:26 +0000 (08:12 +0000)]
ARM: mach-shmobile: specify sh7372 MIPI DSI register layout

Prepare the ap4evb board for the MIPI DSI driver transition to support

different register layouts.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agofbdev: sh_mipi_dsi: support different register layouts
Guennadi Liakhovetski [Wed, 29 Dec 2010 08:12:22 +0000 (08:12 +0000)]
fbdev: sh_mipi_dsi: support different register layouts

The register layout of the MIPI DSI unit on sh-mobile SoCs differ. Add platform
parameters to support such variations.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoARM: mach-shmobile: improve MIPI DSI clock configuration
Guennadi Liakhovetski [Mon, 27 Dec 2010 10:23:09 +0000 (10:23 +0000)]
ARM: mach-shmobile: improve MIPI DSI clock configuration

Now, that the MIPI DSI driver implements runtime PM, we don't need anymore to
configure clocks statically in the platform code. This patch also adds a DSITX1
clock definition for sh7372 and attaches PHY clocks to respective devices.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agofbdev: sh-mobile: implement MIPI DSI runtime PM support
Guennadi Liakhovetski [Mon, 27 Dec 2010 10:23:05 +0000 (10:23 +0000)]
fbdev: sh-mobile: implement MIPI DSI runtime PM support

On SH-Mobile platforms using runtime PM with the MIPI DSI driver switches the
DSI Tx link clock on PM events.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosh: correct definitions to access stack pointers
Roel Kluin [Sat, 1 Jan 2011 18:36:36 +0000 (18:36 +0000)]
sh: correct definitions to access stack pointers

A definition like:

#define regs_return_value(regs) ((regs)->regs[0])

called with regs_return_value(foo) will be preprocessed to:

((foo)->foo[0])
        ^^^
So to fix this to ensure the preprocessor compiles such calls correctly.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosparc: update copyright in piggyback.c
Sam Ravnborg [Tue, 4 Jan 2011 11:39:19 +0000 (11:39 +0000)]
sparc: update copyright in piggyback.c

Update copyright info in piggyback.c to include
info from piggyback_64.c.
Include my own copyright too.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Josip Rodin <joy@entuzijast.net>
Cc: Jakub Jelinek <jakub@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosparc: unify strip command in boot/Makefile
Sam Ravnborg [Tue, 4 Jan 2011 11:39:18 +0000 (11:39 +0000)]
sparc: unify strip command in boot/Makefile

Include an additional "Kernel is ready" print for zImage

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosparc: rename piggyback_32 to piggyback
Sam Ravnborg [Tue, 4 Jan 2011 11:39:17 +0000 (11:39 +0000)]
sparc: rename piggyback_32 to piggyback

Now that we use the same piggyback for 32 and 64 bit
we can drop the _32 suffix.
Include some trivial unification in the Makefile
now that 32 and 64 bit can share the same piggyback command.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosparc: fix tftpboot.img for sparc64 on little-endian host
Sam Ravnborg [Tue, 4 Jan 2011 11:39:16 +0000 (11:39 +0000)]
sparc: fix tftpboot.img for sparc64 on little-endian host

piggyback_32 adapted to support sparc64:
- locating "HdrS" differs for sparc and sparc64
- sparc64 updates a_text, a_data + a_bss in the final a.out header

Updated Makefile to use piggyback_32 for sparc64.
Deleted the now unused piggyback_64.c

piggyback_32.c is host endian neutral and works on both
little-endian and big-endian hosts.
This fixes a long standing bug where sparc64 could not
generate tftpboot.img on a x86 host.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosparc: add $BITS to piggyback arguments
Sam Ravnborg [Tue, 4 Jan 2011 11:39:15 +0000 (11:39 +0000)]
sparc: add $BITS to piggyback arguments

Add new option to piggyback that identify if this is
for 32 or 64 bit.
Use this information to determine the alignment used.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosparc: remove obsolete ELF support in piggyback_32.c
Sam Ravnborg [Tue, 4 Jan 2011 11:39:14 +0000 (11:39 +0000)]
sparc: remove obsolete ELF support in piggyback_32.c

As we always convert to a.out there is no need to
support ELF.

Removing ELF support because:
- it is not used
- it simplifies code to support a.out only

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosparc: additional comments to piggyback_32.c
Sam Ravnborg [Tue, 4 Jan 2011 11:39:13 +0000 (11:39 +0000)]
sparc: additional comments to piggyback_32.c

While reverse engineering the functionality of piggyback
I missed that the code was actually commented.
So I added a few comments.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosparc: use _start for the start entry (like 64 bit does)
Sam Ravnborg [Tue, 4 Jan 2011 11:39:12 +0000 (11:39 +0000)]
sparc: use _start for the start entry (like 64 bit does)

We use "_start" in 64 bit - do the same in 32 bit.
It is always good to be consistent.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosparc: use trapbase in setup_arch
Sam Ravnborg [Tue, 4 Jan 2011 11:39:11 +0000 (11:39 +0000)]
sparc: use trapbase in setup_arch

start and trapbase point to the same address.
But using start to assing to sparc_ttable looked confusing.

Replace this with the use of trapbase.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosparc: refactor piggy_32.c
Sam Ravnborg [Tue, 4 Jan 2011 11:39:10 +0000 (11:39 +0000)]
sparc: refactor piggy_32.c

Refactoring to increase readability (a little).
- sort includes
- spaces around operators
- small helpers introduced
- added a few comments

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoLinux 2.6.37 v2.6.37
Linus Torvalds [Wed, 5 Jan 2011 00:50:19 +0000 (16:50 -0800)]
Linux 2.6.37

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 4 Jan 2011 21:55:49 +0000 (13:55 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  ipv4/route.c: respect prefsrc for local routes
  bridge: stp: ensure mac header is set
  bridge: fix br_multicast_ipv6_rcv for paged skbs
  atl1: fix oops when changing tx/rx ring params
  drivers/atm/atmtcp.c: add missing atm_dev_put
  starfire: Fix dma_addr_t size test for MIPS
  tg3: fix return value check in tg3_read_vpd()
  Broadcom CNIC core network driver: fix mem leak on allocation failures in cnic_alloc_uio_rings()
  ISDN, Gigaset: Fix memory leak in do_disconnect_req()
  CAN: Use inode instead of kernel address for /proc file
  skfp: testing the wrong variable in skfp_driver_init()
  ppp: allow disabling multilink protocol ID compression
  ehea: Avoid changing vlan flags
  ueagle-atm: fix PHY signal initialization race

13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Tue, 4 Jan 2011 19:57:25 +0000 (11:57 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

13 years agolibertas: down_interruptible() can return -EINTR, not EINTR
roel kluin [Mon, 3 Jan 2011 20:03:44 +0000 (12:03 -0800)]
libertas: down_interruptible() can return -EINTR, not EINTR

Fix test in lbs_spi_thread().  down_interruptible() can return -EINTR, but
not EINTR.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix some key comments and code
Johannes Berg [Mon, 3 Jan 2011 18:51:09 +0000 (19:51 +0100)]
mac80211: fix some key comments and code

The key documentation is slightly out of date, fix
that. Also, the list entry in the key struct is no
longer used that way, so list_del_init() isn't
necessary any more there.

Finally, ieee80211_key_link() is no longer invoked
under RCU read lock, but rather with an appropriate
station lock held.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Fix packet injection
Sujith Manoharan [Mon, 3 Jan 2011 15:52:18 +0000 (21:22 +0530)]
ath9k_htc: Fix packet injection

To inject a packet in monitor mode, a dummy station has
to be associated with the monitor interface in the target.
Failing to do this would result in a firmware crash on the device.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: ath5k_eeprom_mode_from_channel() returns signed
Dan Carpenter [Mon, 3 Jan 2011 05:46:29 +0000 (08:46 +0300)]
ath5k: ath5k_eeprom_mode_from_channel() returns signed

ath5k_eeprom_mode_from_channel() returns -1 on error but we're storing
the result in "ee_mode" which is an unsigned char.  This breaks the
error handling.  This patch makes "ee_mode" an int.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k : few rate control clean ups
Mohammed Shafi Shajakhan [Fri, 31 Dec 2010 15:19:00 +0000 (20:49 +0530)]
ath9k : few rate control clean ups

Remove some obvious looking dead code and rename few functions

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoRevert "mac80211: temporarily disable reorder release timer"
Christian Lamparter [Thu, 30 Dec 2010 16:29:53 +0000 (17:29 +0100)]
Revert "mac80211: temporarily disable reorder release timer"

This reverts enables the reorder release timer once again.

The issues laid out in:
<http://www.spinics.net/lists/linux-wireless/msg57214.html>

Have been addressed by:
mac80211: serialize rx path workers
mac80211: ignore PSM bit of reordered frames

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: serialize rx path workers
Christian Lamparter [Thu, 30 Dec 2010 16:25:29 +0000 (17:25 +0100)]
mac80211: serialize rx path workers

This patch addresses the issue of serialization between
the main rx path and various reorder release timers.

<http://www.spinics.net/lists/linux-wireless/msg57214.html>

It converts the previously local "frames" queue into
a global rx queue [rx_skb_queue]. This way, everyone
(be it the main rx-path or some reorder release timeout)
can add frames to it.

Only one active rx handler worker [ieee80211_rx_handlers]
is needed. All other threads which have lost the race of
"runnning_rx_handler" can now simply "return", knowing that
the thread who had the "edge" will also take care of their
workload.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix beacon restart on channel change
Rajkumar Manoharan [Thu, 30 Dec 2010 13:37:44 +0000 (19:07 +0530)]
ath9k: fix beacon restart on channel change

Restart the beacon timers only if the beacon
was already configured. Otherwise beacons timers
are restarted unnecessarily in unassociated state too.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoRevert "ath9k: Parse DTIM period from mac80211"
Mohammed Shafi Shajakhan [Thu, 30 Dec 2010 06:48:01 +0000 (12:18 +0530)]
Revert "ath9k: Parse DTIM period from mac80211"

This reverts commit 0ce3bcfc84900a64347b0fe1140229bd81314008.

Event though with the above commit we obtain the configured DTIM period
from the AP rather than always hardcoding it to '1', this seems to cause
problems under the following scenarios:
* Preventing association with broken AP's
* Adds latency in roaming
So its better to always use the safe value of '1' for dtim period

Cc: Jouni Malinen <Jouni.Malinen@Atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: fix transposition of words in printk
Bob Copeland [Wed, 29 Dec 2010 22:09:02 +0000 (17:09 -0500)]
cfg80211: fix transposition of words in printk

Fixes the misplaced article in the following:

"cfg80211: Updating information on frequency 5785 MHz for
    20 a MHz width channel with regulatory rule:"

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Fix mesh portal communication with other mesh nodes.
Joel A Fernandes [Wed, 29 Dec 2010 01:28:11 +0000 (19:28 -0600)]
mac80211: Fix mesh portal communication with other mesh nodes.

Fixed a bug where if a mesh interface has a different MAC address from its bridge
interface, then it would not be able to send data traffic to any other mesh node.
This also adds support for communication between mesh nodes and external bridged
nodes by using a 6 address format if the source is a node within the mesh and the
destination is an external node proxied by a mesh portal.

Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: fix dma descriptor rx error bit parsing
Felix Fietkau [Tue, 28 Dec 2010 14:46:16 +0000 (15:46 +0100)]
ath9k_hw: fix dma descriptor rx error bit parsing

An Rx DMA descriptor can have multiple error bits set, and some error
bits (e.g. MIC failure) are filtered by the driver based on other criteria.
Remove the 'else' in various error bit checks so that all error information
is properly passed to the driver.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Move LED/RFKILL code to htc_drv_gpio.c
Sujith Manoharan [Tue, 28 Dec 2010 08:58:52 +0000 (14:28 +0530)]
ath9k_htc: Move LED/RFKILL code to htc_drv_gpio.c

And add the copyright/license header.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Fix fast channel change
Sujith Manoharan [Tue, 28 Dec 2010 08:58:37 +0000 (14:28 +0530)]
ath9k_htc: Fix fast channel change

When returning to the operating channel, a full HW
reset has to be done instead of a fast channel change.
Since sw_scan_complete() is called after the config() call for the
home channel, we end up doing a FCC. Fix this issue by checking
the OFFCHANNEL flag to determine FCC.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Handle FATAL events
Sujith Manoharan [Tue, 28 Dec 2010 08:58:27 +0000 (14:28 +0530)]
ath9k_htc: Handle FATAL events

The device has to be reset when a FATAL event is received.
Not doing so would leave the card in a non-working state.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Move work cancellation outside of mutex
Sujith Manoharan [Tue, 28 Dec 2010 08:58:14 +0000 (14:28 +0530)]
ath9k_htc: Move work cancellation outside of mutex

There is no need to lock the various work cancellation
calls. This will be helpful when handling FATAL events.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Handle pending URBs properly
Sujith Manoharan [Tue, 28 Dec 2010 08:58:05 +0000 (14:28 +0530)]
ath9k_htc: Handle pending URBs properly

When doing a channel change, the pending URBs have to be killed
properly on calling htc_stop().

This fixes the probe response timeout seen when sending UDP traffic at
a high rate and running background scan at the same time.

Cc: stable <stable@kernel.org>
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Few clean ups in beacon config parameters
Mohammed Shafi Shajakhan [Tue, 28 Dec 2010 07:36:26 +0000 (13:06 +0530)]
ath9k: Few clean ups in beacon config parameters

Some minor clean ups in assigning values to beacon config parameters

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: ignore PSM bit of reordered frames
Christian Lamparter [Mon, 27 Dec 2010 22:21:26 +0000 (23:21 +0100)]
mac80211: ignore PSM bit of reordered frames

This patch tackles one of the problems of my
reorder release timer patch from August.

<http://www.spinics.net/lists/linux-wireless/msg57214.html>
=>
What if the reorder release triggers and ap_sta_ps_end
(called by ieee80211_rx_h_sta_process) accidentally clears
the WLAN_STA_PS_STA flag, because 100ms ago - when the STA
was still active - frames were put into the reorder buffer.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix comment about removed spinlock
Helmut Schaa [Mon, 27 Dec 2010 14:07:35 +0000 (15:07 +0100)]
rt2x00: Fix comment about removed spinlock

The comment doesn't match the code anymore. Fix that.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Remove unused interface spinlock
Helmut Schaa [Mon, 27 Dec 2010 14:07:16 +0000 (15:07 +0100)]
rt2x00: Remove unused interface spinlock

Since the last user of intf->lock is gone we can safely remove it.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Simplify intf->delayed_flags locking
Helmut Schaa [Mon, 27 Dec 2010 14:06:57 +0000 (15:06 +0100)]
rt2x00: Simplify intf->delayed_flags locking

Instead of protecting delayed_flags with a spinlock use atomic bitops to
make the code more readable.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Remove superfluous assignment of mpdu_density
Helmut Schaa [Mon, 27 Dec 2010 14:06:36 +0000 (15:06 +0100)]
rt2x00: Remove superfluous assignment of mpdu_density

The tx desciptor already gets initialized to 0. Hence, there's no need
to explicitly assign 0 to mpdu_density here.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix panic on frame padding for rt2800 usb devices
Ismael Luceno [Mon, 27 Dec 2010 14:06:17 +0000 (15:06 +0100)]
rt2x00: Fix panic on frame padding for rt2800 usb devices

Backtrace:
  rt2800usb_write_tx_data
  rt2x00queue_write_tx_frame
  rt2x00mac_tx
  invoke_tx_handlers
  __ieee80211_tx
  ieee80211_tx
  virt_to_head_page
  ieee80211_xmit
  ieee80211_tx_skb
  ieee80211_scan_work
  schedule
  ieee80211_scan_work
  process_one_work
  ...

It tried to expand the skb past it's end using skb_put. So I replaced it
with a call to skb_padto, which takes the issue into account.

Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix pointer errors.
Gertjan van Wingerde [Mon, 27 Dec 2010 14:05:55 +0000 (15:05 +0100)]
rt2x00: Fix pointer errors.

Fix some pointer errors in the various calls to memcpy, memset and memmove.

Although none of these errors are fatal (the expression used now results in
the same pointer value) it is better to use the proper expression.
All errors are having to deal with arrays.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: remove intf->mac field.
Gertjan van Wingerde [Mon, 27 Dec 2010 14:05:35 +0000 (15:05 +0100)]
rt2x00: remove intf->mac field.

The mac field of the rt2x00_intf structure is written to once and used
twice. In both these uses the mac address is available via other means.

Remove this field as it does not appear to be necessary.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Remove intf->bssid field.
Gertjan van Wingerde [Mon, 27 Dec 2010 14:05:14 +0000 (15:05 +0100)]
rt2x00: Remove intf->bssid field.

The bssid field in struct rt2x00_intf is only written to once, and is
never read from.

Remove this field, as it appears to not be needed.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: allow txstatus_fifo w/o txstatus_tasklet
Johannes Stezenbach [Mon, 27 Dec 2010 14:04:54 +0000 (15:04 +0100)]
rt2x00: allow txstatus_fifo w/o txstatus_tasklet

When DRIVER_REQUIRE_TXSTATUS_FIFO is set, intialize the
txstatus_fifo, but initialize rt2x00dev->txstatus_tasklet
only when both DRIVER_REQUIRE_TXSTATUS_FIFO and
rt2x00dev->ops->lib->txstatus_tasklet are set.

This allows the txstatus_fifo to be used by rt2800usb which
does not use txstatus_tasklet.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: simplify txstatus_fifo handling
Johannes Stezenbach [Mon, 27 Dec 2010 14:04:29 +0000 (15:04 +0100)]
rt2x00: simplify txstatus_fifo handling

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: fix usb pm suspend->resume woes
Christian Lamparter [Sun, 26 Dec 2010 17:22:29 +0000 (18:22 +0100)]
carl9170: fix usb pm suspend->resume woes

This patch revamps some common code-paths which are
shared between (re-)initialization and suspend/resume
subroutines. It also adds some helpful comments
about quirks and associated difficulties.

It's quite big, but it should fix #25382:
<https://bugzilla.kernel.org/show_bug.cgi?id=25382>

And hopefully the code is robust enough to deal with
all possible suspend/resume scenarios without requiring
the user to do any sort of manual and possibly
dangerous work.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: reduce channel change delay
Christian Lamparter [Sun, 26 Dec 2010 17:22:16 +0000 (18:22 +0100)]
carl9170: reduce channel change delay

By removing two "safety" msleeps (and an echo nop), the
channel change delay is effectively halved. Previously,
the delay could be as long as 260 ms and the device
could not go off-channel without risking to miss the
next DTIM beacon [interval ~307 ms].

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoipv4/route.c: respect prefsrc for local routes
Joel Sing [Mon, 3 Jan 2011 20:24:20 +0000 (20:24 +0000)]
ipv4/route.c: respect prefsrc for local routes

The preferred source address is currently ignored for local routes,
which results in all local connections having a src address that is the
same as the local dst address. Fix this by respecting the preferred source
address when it is provided for local routes.

This bug can be demonstrated as follows:

 # ifconfig dummy0 192.168.0.1
 # ip route show table local | grep local.*dummy0
 local 192.168.0.1 dev dummy0  proto kernel  scope host  src 192.168.0.1
 # ip route change table local local 192.168.0.1 dev dummy0 \
     proto kernel scope host src 127.0.0.1
 # ip route show table local | grep local.*dummy0
 local 192.168.0.1 dev dummy0  proto kernel  scope host  src 127.0.0.1

We now establish a local connection and verify the source IP
address selection:

 # nc -l 192.168.0.1 3128 &
 # nc 192.168.0.1 3128 &
 # netstat -ant | grep 192.168.0.1:3128.*EST
 tcp        0      0 192.168.0.1:3128        192.168.0.1:33228 ESTABLISHED
 tcp        0      0 192.168.0.1:33228       192.168.0.1:3128  ESTABLISHED

Signed-off-by: Joel Sing <jsing@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocarl9170: add missing return-value check
Christian Lamparter [Sun, 26 Dec 2010 17:21:53 +0000 (18:21 +0100)]
carl9170: add missing return-value check

This patch adds a forgotten bail-out path.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: fix cycle counter inconsistent locking
Bob Copeland [Sun, 26 Dec 2010 17:10:05 +0000 (12:10 -0500)]
ath5k: fix cycle counter inconsistent locking

ath5k_reset is called from process context and takes the cc_lock
with plain spin_lock(), but cc_lock can also be taken from tasklets
in softirq context.  Thus we need to at least use spin_lock_bh.

This fixes the following lockdep warning:

[   19.967874] sky2 0000:01:00.0: eth0: enabling interface
[   19.982761] ieee80211 phy0: device now idle
[   20.904809] NET: Registered protocol family 17
[   21.243857] ieee80211 phy0: device no longer idle - scanning
[   21.404343]
[   21.404346] =================================
[   21.404450] [ INFO: inconsistent lock state ]
[   21.404518] 2.6.37-rc7-wl+ #242
[   21.404582] ---------------------------------
[   21.404650] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
[   21.404721] kworker/u:4/982 [HC0[0]:SC1[3]:HE1:SE0] takes:
[   21.404792]  (&(&common->cc_lock)->rlock){+.?...}, at: [<f8115780>] ath5k_ani_calibration+0x29/0x5d9 [ath5k]
[   21.405011] {SOFTIRQ-ON-W} state was registered at:
[   21.405011]   [<c105cadd>] __lock_acquire+0x62f/0x13c1
[   21.405011]   [<c105d944>] lock_acquire+0xd5/0xf1
[   21.405011]   [<c12c978d>] _raw_spin_lock+0x45/0x72
[   21.405011]   [<f8111533>] ath5k_reset+0x2c0/0x349 [ath5k]
[   21.405011]   [<f8111a7a>] ath5k_start+0xb8/0x139 [ath5k]
[   21.405011]   [<f849c714>] ieee80211_do_open+0x13f/0x819 [mac80211]
[   21.405011]   [<f849ce51>] ieee80211_open+0x63/0x66 [mac80211]
[   21.405011]   [<c1258b2e>] __dev_open+0x8d/0xb6
[   21.405011]   [<c1255c64>] __dev_change_flags+0x9d/0x114
[   21.405011]   [<c1258a75>] dev_change_flags+0x18/0x44
[   21.405011]   [<c1262990>] do_setlink+0x23f/0x521
[   21.405011]   [<c1262d58>] rtnl_setlink+0xe6/0xea
[   21.405011]   [<c126347c>] rtnetlink_rcv_msg+0x18a/0x1a0
[   21.405011]   [<c126d5f0>] netlink_rcv_skb+0x35/0x7b
[   21.405011]   [<c12632eb>] rtnetlink_rcv+0x20/0x27
[   21.405011]   [<c126d370>] netlink_unicast+0x1bb/0x21e
[   21.405011]   [<c126db21>] netlink_sendmsg+0x23b/0x288
[   21.405011]   [<c124823c>] sock_sendmsg+0xac/0xc4
[   21.405011]   [<c1248680>] sys_sendmsg+0x152/0x1a2
[   21.405011]   [<c1249b0d>] sys_socketcall+0x214/0x275
[   21.405011]   [<c10029d0>] sysenter_do_call+0x12/0x36
[   21.405011] irq event stamp: 138032
[   21.405011] hardirqs last  enabled at (138032): [<c12ca252>] _raw_spin_unlock_irqrestore+0x3b/0x5e
[   21.405011] hardirqs last disabled at (138031): [<c12c98cc>] _raw_spin_lock_irqsave+0x18/0x7e
[   21.405011] softirqs last  enabled at (138024): [<f84a570e>] ieee80211_tx_skb+0x47/0x49 [mac80211]
[   21.405011] softirqs last disabled at (138027): [<c100452b>] do_softirq+0x63/0xb4
[   21.405011]
[   21.405011] other info that might help us debug this:
[   21.405011] 3 locks held by kworker/u:4/982:
[   21.405011]  #0:  (name){+.+.+.}, at: [<c1046158>] process_one_work+0x1b8/0x41b
[   21.405011]  #1:  ((&(&local->scan_work)->work)){+.+.+.}, at: [<c1046158>] process_one_work+0x1b8/0x41b
[   21.405011]  #2:  (&local->mtx){+.+.+.}, at: [<f84920fb>] ieee80211_scan_work+0x32/0x4a4 [mac80211]
[   21.405011]
[   21.405011] stack backtrace:
[   21.405011] Pid: 982, comm: kworker/u:4 Not tainted 2.6.37-rc7-wl+ #242
[   21.405011] Call Trace:
[   21.405011]  [<c12c6e68>] ? printk+0x1d/0x25
[   21.405011]  [<c105a742>] print_usage_bug+0x181/0x18b
[   21.405011]  [<c105b196>] ? check_usage_forwards+0x0/0xb6
[   21.405011]  [<c105a9ec>] mark_lock+0x2a0/0x4aa
[   21.405011]  [<c1059f6d>] ? trace_hardirqs_off+0xb/0xd
[   21.405011]  [<c105ca68>] __lock_acquire+0x5ba/0x13c1
[   21.405011]  [<c1059eed>] ? trace_hardirqs_off_caller+0x18/0x8d
[   21.405011]  [<c1059f6d>] ? trace_hardirqs_off+0xb/0xd
[   21.405011]  [<c1050411>] ? local_clock+0x2c/0x4f
[   21.405011]  [<c1059e00>] ? save_trace+0x2/0xa0
[   21.405011]  [<c105ac39>] ? mark_held_locks+0x43/0x5b
[   21.405011]  [<c12ca252>] ? _raw_spin_unlock_irqrestore+0x3b/0x5e
[   21.405011]  [<f8115780>] ? ath5k_ani_calibration+0x29/0x5d9 [ath5k]
[   21.405011]  [<c105d944>] lock_acquire+0xd5/0xf1
[   21.405011]  [<f8115780>] ? ath5k_ani_calibration+0x29/0x5d9 [ath5k]
[   21.405011]  [<c12c9b1a>] _raw_spin_lock_bh+0x4a/0x77
[   21.405011]  [<f8115780>] ? ath5k_ani_calibration+0x29/0x5d9 [ath5k]
[   21.405011]  [<f8115780>] ath5k_ani_calibration+0x29/0x5d9 [ath5k]
[   21.405011]  [<c105ac39>] ? mark_held_locks+0x43/0x5b
[   21.405011]  [<f8113496>] ath5k_tasklet_ani+0x1d/0x27 [ath5k]
[   21.405011]  [<c1037304>] tasklet_action+0x96/0x137
[   21.405011]  [<c10379b5>] __do_softirq+0xde/0x1c3
[   21.405011]  [<c10b0cef>] ? arch_get_unmapped_area_topdown+0x3b/0x127
[   21.405011]  [<c10378d7>] ? __do_softirq+0x0/0x1c3
[   21.405011]  <IRQ>  [<c1036dee>] ? irq_exit+0x3d/0x49
[   21.405011]  [<c1003b4f>] ? do_IRQ+0x98/0xac
[   21.405011]  [<c1002eee>] ? common_interrupt+0x2e/0x34
[   21.405011]  [<c103007b>] ? sys_unshare+0x57/0x226
[   21.405011]  [<c1047fee>] ? queue_delayed_work+0x1/0x27
[   21.405011]  [<f84a83a0>] ? ieee80211_queue_delayed_work+0x2e/0x33 [mac80211]
[   21.405011]  [<f8492528>] ? ieee80211_scan_work+0x45f/0x4a4 [mac80211]
[   21.405011]  [<c104620e>] ? process_one_work+0x26e/0x41b
[   21.405011]  [<c1046158>] ? process_one_work+0x1b8/0x41b
[   21.405011]  [<f84920c9>] ? ieee80211_scan_work+0x0/0x4a4 [mac80211]
[   21.405011]  [<c10466b6>] ? worker_thread+0x18a/0x2a5
[   21.405011]  [<c12ca25e>] ? _raw_spin_unlock_irqrestore+0x47/0x5e
[   21.405011]  [<c104652c>] ? worker_thread+0x0/0x2a5
[   21.405011]  [<c104abe7>] ? kthread+0x67/0x6c
[   21.405011]  [<c104ab80>] ? kthread+0x0/0x6c
[   21.405011]  [<c1002efa>] ? kernel_thread_helper+0x6/0x10

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix spur mitigation no-spur case for AR9002
Brian Prodoehl [Sat, 25 Dec 2010 19:34:43 +0000 (14:34 -0500)]
ath9k: fix spur mitigation no-spur case for AR9002

For the AR9002, the spur frequency read from the EEPROM is mangled
before being compared against AR_NO_SPUR.  This results in the driver
trying to set up the spur mitigation for bogus spurs, rather than
cleanly breaking out.

Signed-off-by: Brian Prodoehl <bprodoehl@nomadio.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoairo: use simple_write_to_buffer
Akinobu Mita [Sat, 25 Dec 2010 06:03:58 +0000 (15:03 +0900)]
airo: use simple_write_to_buffer

Simplify write file operation for /proc files by using
simple_write_to_buffer().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: spin_lock_bh is not required within tasklet context.
Senthil Balasubramanian [Thu, 23 Dec 2010 15:36:57 +0000 (21:06 +0530)]
ath9k: spin_lock_bh is not required within tasklet context.

Disabling BH is not required while running from a tasklet context
and so replace spin_lock_bh with just spin_lock.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: fix scan tx antenna setting on 5Ghz band
Stanislaw Gruszka [Thu, 23 Dec 2010 14:12:30 +0000 (15:12 +0100)]
iwlagn: fix scan tx antenna setting on 5Ghz band

Looks that we do not set correctly antennas when scanning
on 5Ghz band and when bluetooth is enabled, because
priv->cfg->scan_tx_antennas[band] is only defined for
IEEE80211_BAND_2GHZ.

To fix we check band before limiting antennas to first one.
This allow to remove hard coded cfg->scan_tx_antennas[band].

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Move mac80211 functions into new file
Bruno Randolf [Wed, 22 Dec 2010 10:20:32 +0000 (19:20 +0900)]
ath5k: Move mac80211 functions into new file

Move mac80211 functions into new file mac80211-ops.c to have a better
separation and to make base.c smaller.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonet: typos in comments in include/linux/igmp.h
Francois-Xavier Le Bail [Tue, 4 Jan 2011 09:10:20 +0000 (09:10 +0000)]
net: typos in comments in include/linux/igmp.h

There are typos in comments in include/linux/igmp.h:

83 #define IGMP_HOST_MEMBERSHIP_QUERY      0x11    /* From RFC1112 */
84 #define IGMP_HOST_MEMBERSHIP_REPORT     0x12    /* Ditto */
[snip]
88 #define IGMPV2_HOST_MEMBERSHIP_REPORT   0x16    /* V2 version of 0x11 */
89 #define IGMP_HOST_LEAVE_MESSAGE         0x17
90 #define IGMPV3_HOST_MEMBERSHIP_REPORT   0x22    /* V3 version of 0x11 */

The line 88 and 90 are about REPORT messages.
The IGMP_HOST_MEMBERSHIP_REPORT (IGMP V1) value is 0x12.
So the comment on line 88 must be /* V2 version of 0x12 */,
and the comment on line 90 must be /* V3 version of 0x12 */.

Signed-off-by: Francois-Xavier Le Bail <fx.lebail@orange.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git...
John W. Linville [Tue, 4 Jan 2011 19:26:34 +0000 (14:26 -0500)]
Merge branch 'wireless-next-2.6' of git://git./linux/kernel/git/iwlwifi/iwlwifi-2.6

13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetoot...
John W. Linville [Tue, 4 Jan 2011 19:25:28 +0000 (14:25 -0500)]
Merge branch 'master' of /linux/kernel/git/padovan/bluetooth-next-2.6

13 years agomac80211: add missing synchronize_rcu
Johannes Berg [Mon, 3 Jan 2011 18:42:24 +0000 (19:42 +0100)]
mac80211: add missing synchronize_rcu

commit ad0e2b5a00dbec303e4682b403bb6703d11dcdb2
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Tue Jun 1 10:19:19 2010 +0200

    mac80211: simplify key locking

removed the synchronization against RCU and thus
opened a race window where we can use a key for
TX while it is already freed. Put a synchronisation
into the right place to close that window.

Reported-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Cc: stable@kernel.org [2.6.36+]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix mesh forwarding when ratelimited too
Milton Miller [Thu, 30 Dec 2010 08:01:03 +0000 (02:01 -0600)]
mac80211: fix mesh forwarding when ratelimited too

Commit b51aff057c9d0ef6c529dc25fd9f775faf7b6c63 said:

    Under memory pressure, the mac80211 mesh code
    may helpfully print a message that it failed
    to clone a mesh frame and then will proceed
    to crash trying to use it anyway. Fix that.

Avoid the reference whenever the frame copy is unsuccessful
regardless of the debug message being suppressed or printed.

Cc: stable@kernel.org [2.6.27+]
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoAdded support for ampopts in APBUART driver. Used in AMP systems.
Daniel Hellstrom [Tue, 4 Jan 2011 01:41:35 +0000 (01:41 +0000)]
Added support for ampopts in APBUART driver. Used in AMP systems.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoAPBUART: added raw AMBA vendor/device number to match against.
Daniel Hellstrom [Tue, 4 Jan 2011 01:41:34 +0000 (01:41 +0000)]
APBUART: added raw AMBA vendor/device number to match against.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoSPARC/LEON: avoid AMBAPP name duplicates in openprom fs when REG is missing
Daniel Hellstrom [Tue, 4 Jan 2011 01:41:33 +0000 (01:41 +0000)]
SPARC/LEON: avoid AMBAPP name duplicates in openprom fs when REG is missing

When the REG property is not available the NODE-ID is used as an unique
identifier in order to avoid filesystem name duplicates in /proc/openprom
filesystem

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoSPARC/LEON: added support for selecting Timer Core and Timer within core
Daniel Hellstrom [Tue, 4 Jan 2011 01:41:32 +0000 (01:41 +0000)]
SPARC/LEON: added support for selecting Timer Core and Timer within core

The ability to select Timer Core and Timer instance for system clock
makes it possible for multiple AMP systems to coexist.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoLEON: added raw AMBA vendor/device number to find TIMER, IRQCTRL
Daniel Hellstrom [Tue, 4 Jan 2011 01:41:31 +0000 (01:41 +0000)]
LEON: added raw AMBA vendor/device number to find TIMER, IRQCTRL

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoSPARC/LEON: added support for IRQAMP IRQ Controller
Daniel Hellstrom [Tue, 4 Jan 2011 01:41:30 +0000 (01:41 +0000)]
SPARC/LEON: added support for IRQAMP IRQ Controller

Needed for LEON AMP systems where different CPUs are routed to

different IRQ controllers. This patch selects the IRQ Controller
which has been routed to the boot CPU, it is up to the boot loader
to configure the IRQ controller.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoSPARC/LEON: find IRQCTRL and Timer via OF-Tree, instead of hardcoded.
Daniel Hellstrom [Tue, 4 Jan 2011 01:41:29 +0000 (01:41 +0000)]
SPARC/LEON: find IRQCTRL and Timer via OF-Tree, instead of hardcoded.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoiwlagn: enable only rfkill interrupt when device is down
Stanislaw Gruszka [Thu, 23 Dec 2010 11:38:21 +0000 (12:38 +0100)]
iwlagn: enable only rfkill interrupt when device is down

Since commit 6cd0b1cb872b3bf9fc5de4536404206ab74bafdd "iwlagn: fix
hw-rfkill while the interface is down", we enable interrupts when
device is not ready to receive them. However hardware, when it is in
some inconsistent state, can generate other than rfkill interrupts
and crash the system. I can reproduce crash with "kernel BUG at
drivers/net/wireless/iwlwifi/iwl-agn.c:1010!" message, when forcing
firmware restarts.

To fix only enable rfkill interrupt when down device and after probe.
I checked patch on laptop with 5100 device, rfkill change is still
passed to user space when device is down.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: stable@kernel.org
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoremove trim_fs method from Documentation/filesystems/Locking
Christoph Hellwig [Tue, 4 Jan 2011 06:14:24 +0000 (07:14 +0100)]
remove trim_fs method from Documentation/filesystems/Locking

The ->trim_fs has been removed meanwhile, so remove it from the documentation
as well.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years ago[media] v4l2-compat-ioctl32: fix compile warning
Hans Verkuil [Fri, 31 Dec 2010 15:34:32 +0000 (12:34 -0300)]
[media] v4l2-compat-ioctl32: fix compile warning

drivers/media/video/v4l2-compat-ioctl32.c: In function 'get_v4l2_format32':
drivers/media/video/v4l2-compat-ioctl32.c:169:2: warning: case value '0' not in enumerated type 'enum v4l2_buf_type'
drivers/media/video/v4l2-compat-ioctl32.c: In function 'put_v4l2_format32':
drivers/media/video/v4l2-compat-ioctl32.c:200:2: warning: case value '0' not in enumerated type 'enum v4l2_buf_type'

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] zoran: fix compiler warning
Hans Verkuil [Fri, 31 Dec 2010 15:30:56 +0000 (12:30 -0300)]
[media] zoran: fix compiler warning

drivers/media/video/zoran/zoran_driver.c: In function 'zoran_dqbuf':
drivers/media/video/zoran/zoran_driver.c:2197:21: warning: 'bs.frame' may be used uninitialized in this function

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tda18218: fix compile warning
Hans Verkuil [Fri, 31 Dec 2010 15:26:53 +0000 (12:26 -0300)]
[media] tda18218: fix compile warning

drivers/media/common/tuners/tda18218.c: In function 'tda18218_wr_regs':
drivers/media/common/tuners/tda18218.c:58:5: warning: 'ret' may be used uninitialized in this function

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] ngene: fix compile warning
Hans Verkuil [Fri, 31 Dec 2010 15:25:32 +0000 (12:25 -0300)]
[media] ngene: fix compile warning

drivers/media/dvb/ngene/ngene-core.c: In function 'ngene_start':
drivers/media/dvb/ngene/ngene-core.c:1308:16: warning: unused variable 'flags'

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agor8169: more 8168dp support.
françois romieu [Mon, 3 Jan 2011 15:08:37 +0000 (15:08 +0000)]
r8169: more 8168dp support.

Adapted from version 8.019.00 of Realtek's r8168 driver

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agor8169: rtl_csi_access_enable rename.
françois romieu [Mon, 3 Jan 2011 15:08:29 +0000 (15:08 +0000)]
r8169: rtl_csi_access_enable rename.

Newer 8168 needs a slightly different rtl_csi_access_enable.
This patch separates some noise from the real thing.

No functional change.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agor8169: magic.
françois romieu [Mon, 3 Jan 2011 15:08:21 +0000 (15:08 +0000)]
r8169: magic.

Adapted from version 8.019.00 of Realtek's r8168 driver.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agor8169: phy power ops
françois romieu [Mon, 3 Jan 2011 15:08:12 +0000 (15:08 +0000)]
r8169: phy power ops

Bits from :
- version 8.019.00 of Realtek's 8168 driver
- version 1.019.00 of Realtek's 8101 driver

Plain old 8169 (PCI) devices do not seem to need anything akin to it.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agor8169: 8168DP specific MII registers access methods.
françois romieu [Mon, 3 Jan 2011 15:08:04 +0000 (15:08 +0000)]
r8169: 8168DP specific MII registers access methods.

Adapted from version 8.019.00 of Realtek's r8168 driver and
amended per Hayes Wang's correction :
- OCPDR_GPHY_REG_SHIFT must be 16, not 12
- the reg should be at bit 16 ~ 22, whence OCPDR_REG_MASK

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agor8169: use device dependent methods to access the MII registers.
françois romieu [Mon, 3 Jan 2011 15:07:55 +0000 (15:07 +0000)]
r8169: use device dependent methods to access the MII registers.

Current mdio_{read/write} needs device specific information to work
correctly with newer chipsets.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agor8169: identify different registers.
françois romieu [Mon, 3 Jan 2011 15:07:42 +0000 (15:07 +0000)]
r8169: identify different registers.

Documentation (sort of).

The location are the same, the values are the same but it is
just accidental. Note that the 810x could cope with a smaller
value as it does not support jumbo frames.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agor8169: remove the firmware of RTL8111D.
françois romieu [Mon, 3 Jan 2011 15:07:31 +0000 (15:07 +0000)]
r8169: remove the firmware of RTL8111D.

The binary file of the firmware is moved to linux-firmware repository.
The firmwares are rtl_nic/rtl8168d-1.fw and rtl_nic/rtl8168d-2.fw.
The driver goes along if the firmware couldn't be found. However, it
is suggested to be done with the suitable firmware.

Some wrong PHY parameters are directly corrected in the driver.

Simple firmware checking added per Ben Hutchings suggestion.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Ben Hutchings <benh@debian.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosched, autogroup: Fix reference leak
Mike Galbraith [Fri, 31 Dec 2010 08:32:30 +0000 (09:32 +0100)]
sched, autogroup: Fix reference leak

The cgroup exit mess also uncovered a struct autogroup reference leak.
copy_process() was simply freeing vs putting the signal_struct,
stranding a reference.

Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Oleg Nesterov <oleg@redhat.com>
LKML-Reference: <1293784350.6839.2.camel@marge.simson.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>