bcmdhd: update to lge omap4 generic version
enables concurrent p2p0 support
Revert: "OMAP4: enable overclock"

This reverts commit 149e1fdc24ba6b6655b48f04f23ebbda701c0cfa.

causes some problems due to mpu stalling resulting in audio stutters. disable it for now.
bcmdhd: enable power saving and pktfilter

backported from iproj:
https://github.com/CyanogenMod/lge-kernel-iproj/commit/74ee8bbf3bf86983be123305ac4af3e51a5a6adb
USB: OHCI: do not poll root hub status if HC is not running

If the OHCI root hub is suspended the clocks may be
not provided to HW and we get errors on OHCI registers
access. So do not poll it in such cases (like is done
for EHCI)

Change-Id: Ic81833a87c479822fe3c7f23792ee7ac7154e248
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
OMAP4: battery: capacity detection.

Capacity could be detected when it is not charging.
If charge status set to POWER_SUPPLY_STATUS_NOT_CHARGING
capacity detection path is omitted.

Add this state to let capacity detection happen.

Change-Id: I34a8295470457423d25cc2ec42e2498682339dcc
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
omap-hsmmc: Prevent possible race condition

Making mmc_host_enable() and mmc_host_disable() invocations exclusive to
prevent race condition that occurs on specific board configurations based
on Blaze platform when repeated suspend/resume performed.

Change-Id: Ia709c2e0a4e19a0abb1cfbe7651c838b7c13fc1c
Signed-off-by: Semen Protsenko <semen.protsenko@ti.com>
OMAP4430/60: EMIF: errata: Prohibit usage of Power-Down mode

A ZQ calibration long command is issued every time on exit
from active power-down and precharge power-down modes
when EMIF is configured to use Power-down mode
(EMIF_PWR_MGMT_CTRL.REG_LP_MODE=0x4).

Due to very short periods of power-down cycles, ZQ calibration
overhead creates bandwidth issues and increases overall system
power consumption.

As result, the guideline is to not allow Power-down mode and,
therefore, to not have set the
EMIF_PWR_MGMT_CTRL[10:8] REG_LP_MODE bit field to 0x4.

TI Errata i743; IMPACTED: OMAP4430/60 all revisions

Change-Id: Ib82f28e6e0c6c046ea277b90a78dc82c1ee82417
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Vitaly Chernooky <vitaly.chernooky@ti.com>
leds: allow the powerled to be lit independently
Revert "bcmdhd: enable power saving and pktfilter"

This reverts commit c4ce926cb4d6fb9c70906be5182a15745a1f8007.
bcmdhd: Enable Ad-Hoc (IBSS) mode
backported from tuna
see https://github.com/CyanogenMod/android_kernel_samsung_tuna/commit/4da33984c1c6e07a278f2e26687472e1a67bb777
bcmdhd: restored ARP offload agent mode
taken from tuna
https://github.com/CyanogenMod/android_kernel_samsung_tuna/commit/6ccf1c0af64307805324b58142a2664043db277c
lightsensor: fix insanely high bogus luxvalues in certain cases

the calculations for APDS_IAC2 will result in 42949672 in some cases.
this is an unwanted bahavior which will eventually result in burning your eyeballs out of your skull in low-light conditions by raising the backlight brightness to 255.
fix it by splitting the calc operations for APDS_IAC2.
lightsensor: apply arithmetic split to lux calc
in VERY rare situations in extremely low-light environments with the presence of high intensity IR light (cigarette!) both of the APDS values are negative. luxvalue calculation is bogus then. fix it by also applying the calculation split here.
bcmdhd: workaround broken AC video queue in IBSS mode
backported from tuna
see https://github.com/CyanogenMod/android_kernel_samsung_tuna/commit/652798b5265c8910e2c88df155fe238983297680
kernel/sys.c: fix stack memory content leak via UNAME26

commit 2702b1526c7278c4d65d78de209a465d4de2885e upstream.

Calling uname() with the UNAME26 personality set allows a leak of kernel
stack contents.  This fixes it by defensively calculating the length of
copy_to_user() call, making the len argument unsigned, and initializing
the stack buffer to zero (now technically unneeded, but hey, overkill).

CVE-2012-0957

Reported-by: PaX Team <pageexec@freemail.hu>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: PaX Team <pageexec@freemail.hu>
Cc: Brad Spengler <spender@grsecurity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
use clamp_t in UNAME26 fix

commit 31fd84b95eb211d5db460a1dda85e004800a7b52 upstream.

The min/max call needed to have explicit types on some architectures
(e.g. mn10300). Use clamp_t instead to avoid the warning:

  kernel/sys.c: In function 'override_release':
  kernel/sys.c:1287:10: warning: comparison of distinct pointer types lacks a cast [enabled by default]

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
netfilter: xt_qtaguid: report only uid tags to non-privileged processes

In the past, a process could only see its own stats (uid-based summary,
and details).
Now we allow any process to see other UIDs uid-based stats, but still
hide the detailed stats.

Change-Id: I7666961ed244ac1d9359c339b048799e5db9facc
Signed-off-by: JP Abgrall <jpa@google.com>
ARM: disable preemption in machine_shutdown

Since the smp call to stop the other cpus are handled in those
cpus in interrupt context, there's a potential for those smp
handlers to interrupt threads holding spin locks (such as the
one a mutex holds).  This prevents those threads from ever
releasing their spin lock, so if the cpu doing the shutdown
is allowed to switch to another thread that tries to grab the
same lock/mutex, we could get into a deadlock (the spin lock
call is called with preemption disabled in the mutex lock code).

To avoid that possibility, disable preemption before doing the
smp_send_stop().

Change-Id: I7976c5382d7173fcb3cd14da8cc5083d442b2544
Signed-off-by: Mike J. Chen <mjchen@google.com>
bcmdhd: Enable P2P probe request handling only during discovery
backported from tuna
see https://github.com/CyanogenMod/android_kernel_samsung_tuna/commit/c177c7e050834efb67e047c01fbd0b0e9914d64a
wifi: re-enable adaptive power management
discard setting pm mode via config file