net: wireless: bcmdhd: Fix sending ctrl packet

- Schedule dpc thread to send ctrl frame if we cannot
  send ctrl packet immediately.

Change-Id: I5ae8b705a6ccddcc1f5c86b4c094342b57d26c7f
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
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>
Revert "activate deep idle stats by default"

This reverts commit eb1ac293d15c74e813c5b08deca2bfba0913111d.
Revert "More work on Deep Idle"

This reverts commit 0a3cff849e7a528a0dd60725a5e629fe1e888fd0.
Revert "Fix Deep Idle"

This reverts commit 623cc5473771191366554b0d92e8280749c4e150.
Revert "deep idle v2"

This reverts commit 886fe4d5baa64bd40954670a2766286d5639a625.
ported to samsung i9000 by modifying aries-rfkill.c instead of herring-rfkill.c

cpuidle: idle2: v0.210 standalone patch
Contains squashed commit of: v0.201, v0.202, v0.210 patches.

cpuidle: idle2: v0.210
Implement DEEP-IDLE TOP ON state for use when bluetooth or GPS is active
Many micro-optimisations of functions and variables to speed up the hot paths
Changed some debug printk to KERN_DEBUG.

cpuidle: idle2: v0.202
Fix issue where IDLE2 mode would not be entered after antutu had been ran.
Issue was related to power gating checks from deep-idle which I implemented
in v0.200. These checks are not needed, and cause this issue due to the
S5PV210_PD_CAM power domain not being gated after antutu and some other
benchmarks have been ran.

v0.201 is a complete rewrite of the majority of the idle2 codebase.
2 idle states have now been fully implemented and are available at all times.
The states are IDLE and IDLE2, which is DEEP-IDLE TOP OFF.
DEEP-IDLE TOP ON is not implemented, as it has no benefit.

The hot code paths are now more optimised and faster.
Workqueues are used to inform idle2 of events from other subsystems,
such as audio, usb connected and bluetooth.
PM notifiers are used to notify idle2 of a suspend, although it should
never get into a situation where it is working at the same time as the
system is suspending.

Add code to disable cpufreq and lock the CPU at 800MHz when the conditions
are right to enter IDLE2. This appears to save a lot more power.
Add earlysuspend hook back in to ensure the above doesn't occur whilst the
screen is on.

Adjust exit latency to 400 as that is the max specified in the TRM. Also
reduce residency time to 2000 as that seems like a more reasonable figure.
Remove s5p_idle2 function from asm and use generic flush_cache_all()
and cpu_do_idle() calls instead. The only asm left now is the register
save and restore code.

The IDLE2 mode will only be activated when audio has been playing back
for more than 30 seconds, the device is not connected to USB, bluetooth is
not active (it can be enabled, but not be actively working) various clocks
are gated (in practice, this means that the screen has to be off), certain
subsystems are not active and there are no interrupts pending.

The early suspend and late resume hooks have been removed as they are not
required, as have the suspend and resume hooks.

Many of the idle2 specific functions have been split into idle2.h to keep
them separate from the stock code.

IDLE2 can be disabled with the following command:
echo 1 > /sys/module/cpuidle/parameters/idle2_disabled

Stats can be obtained from the standard cpuidle interface, which, for
IDLE2 is located at:
/sys/devices/system/cpu/cpu0/cpuidle/state1
idle2: should be aries instead of herring here
cpuidle: idle2: v0.211
Fixed issue causing ANR in systemui due to timing of disabling of IDLE2 mode
when late_resume is called. We now disable *before* the suspend status is
changed.
Issue introduced in v0.210 due to code optimisations making the IDLE2 code
too fast, which is ironic.
cpuidle: idle2: v0.212
Restore idle2_cpufreq_lock code to v0.210 version.
Few more micro-optimisations
cpuidle: idle2: Enable idle2 all the time, not just when music is playing
cpuidle: idle2: v0.213
Add missing ifdef for IDLE2 in earlysuspend.
Move idle2 calls from samsung to core
Calls placed in samsung.c were interfering with display intitialisation
for some users.
Reduce loop iterations in s5p_init_remap()
Previously we were looping 15 times, and as there are only 5 items in
the struct it is a bit pointless. Reduce it to 5.
Refactor code slightly, remove some pointless duplicated tests from the
hot paths.
Don't disallow TOP ON when TOP OFF is enabled, allow cpuidle to choose
appropriate idle method.
Place idle states in the correct order. They should be placed highest to
lowest, but they were not.
Set target_residency of normal WFI to 1us. Any other value really doesn't
make sense. The CPU should be in WFI for as much time as possible when it is
awake, and WFI is cheap and saves power, so lets use it more.
Adjust target_residency of TOP OFF and TOP ON, so all 3 states are used.
make idle_2 freq dependent on live_oc
s5pvXXX: cpufreq: Fix 2 section mismatch warnings
s5pv210: Fix section mismatch warning
s5pv210: rfkill: Fix section mismatch warning
samsung: regs-serial: Fix: warning: 'struct uart_port' declared inside parameter list arch/arm/plat-samsung/include/plat/regs-serial.h:284:27: warning: 'struct uart_port' declared inside parameter list [enabled by default] arch/arm/plat-samsung/include/plat/regs-serial.h:284:27: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
i2c: s3c2410: Add NULL pointer check in s3c24xx_i2c_irq
Getting reports of Oopses occasionally with a NULL pointer dereference
always in the same function. I believe in some circumstances *dev_id is NULL
which is causing said issue, so check before use and bail if NULL.
misc: modem_ctl: fix compiler warnings and fix borked goto
cpuidle: Add last_residency trace event for residency profiling