DO NOT MERGE: g2: squashed kernel update

update the current kernel with latest source drop from LG.
will need updates to g2-common:
http://review.cyanogenmod.org/#/c/74984/
also needs new blobs:
https://github.com/vware/proprietary_vendor_lge

changes:
 ps2 : get kernel ready for display-caf-new (fixes vsync)
 ps5 : major clean up to makefile
 ps9 : update media drivers, fix touch gestures, misc
 ps10: changes from lg
 ps11: update media and video drivers (fixes video)
 ps13: (Rashed) update d800, d801, ls980, vs980 configs
 ps14: add a git dependancy

Change-Id: Ifce1de450db391693d0f26e6f8148d51c9e4a612
Revert "msm: vidc: Send resolution along with output buffer"

This reverts commit 07962ad68350a92fa532c14addf5a533d5ed80bb.

Change-Id: Ia5ff34180d8c7e4aa9af40bed6e54c9c8e7c9ad1
mmc: sdhci: disable HPI, use 4bi async transferss

Change-Id: If732417ae0f8cf5005509c157998054cd94063b3
REVERT THIS BEFORE UPDATE ion: Rename heap_mask when used in userspace

The L userspace expects this field to have a different name :/
net: ipv6: Add IPv6 support to the ping socket.

[msm/android-3.4 commit 1f0675844e3b63a765e5bd32bc5af051ccd951c0]

This adds the ability to send ICMPv6 echo requests without a
raw socket. The equivalent ability for ICMPv4 was added in
2011.

Instead of having separate code paths for IPv4 and IPv6, make
most of the code in net/ipv4/ping.c dual-stack and only add a
few IPv6-specific bits (like the protocol definition) to a new
net/ipv6/ping.c. Hopefully this will reduce divergence and/or
duplication of bugs in the future.

Caveats:

- Setting options via ancillary data (e.g., using IPV6_PKTINFO
  to specify the outgoing interface) is not yet supported.
- There are no separate security settings for IPv4 and IPv6;
  everything is controlled by /proc/net/ipv4/ping_group_range.
- The proc interface does not yet display IPv6 ping sockets
  properly.

Tested with a patched copy of ping6 and using raw socket calls.
Compiles and works with all of CONFIG_IPV6={n,m,y}.

Conflicts:
	net/ipv4/ping.c

Bug: 9469865
Change-Id: I752190e680c009c371d177d8f84af242d3990813
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[lorenzo@google.com: backported to 3.4]
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
[lorenzo@google.com: include export.h to fix missing THIS_MODULE]
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
net: ipv6: add missing lock in ping_v6_sendmsg

[msm/android-3.4 commit 3a018d2e8fc2910e5fb2077cde81cad659e2c7f9]

Bug: 9469865
Change-Id: I5ca9624d68fcbddf6469e5124a14b6fceedb7398
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net: ipv6: fix wrong ping_v6_sendmsg return value

[msm/android-3.4 commit 5f0fd6105f491b8b435863e98f7e96d617e3da84]

ping_v6_sendmsg currently returns 0 on success. It should return
the number of bytes written instead.

Bug: 9469865
Change-Id: If1eba8445f207b25ac8c868cbe9814554cdec8df
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net: core: Support UID-based routing.

This contains the following commits:

1. 0149763 net: core: Add a UID range to fib rules.
2. 1650474 net: core: Use the socket UID in routing lookups.
3. 0b16771 net: ipv4: Add the UID to the route cache.
4. ee058f1 net: core: Add a RTA_UID attribute to routes.
    This is so that userspace can do per-UID route lookups.

Bug: 15413527
Change-Id: I1285474c6734614d3bda6f61d88dfe89a4af7892
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
net: add a sysctl to reflect the fwmark on replies

Kernel-originated IP packets that have no user socket associated
with them (e.g., ICMP errors and echo replies, TCP RSTs, etc.)
are emitted with a mark of zero. Add a sysctl to make them have
the same mark as the packet they are replying to.

This allows an administrator that wishes to do so to use
mark-based routing, firewalling, etc. for these replies by
marking the original packets inbound.

Tested using user-mode linux:
 - ICMP/ICMPv6 echo replies and errors.
 - TCP RST packets (IPv4 and IPv6).

Change-Id: I95d896647b278d092ef331d1377b959da1deb042
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
nf: IDLETIMER: time-stamp and suspend/resume handling.

Message notifications contains an additional timestamp field in nano seconds.
The expiry time for the timers are modified during suspend/resume.
If timer was supposed to expire while the system is suspended then a
notification is sent when it resumes with the timestamp of the scheduled expiry.

Removes the race condition for multiple work scheduled.

Bug: 13247811

Change-Id: I752c5b00225fe7085482819f975cc0eb5af89bff
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
defconfigs: enable CONFIG_NETFILTER_XT_TARGET_IDLETIMER

Change-Id: Ie3087845c6afbb30652547c4040ed004dfe279a1

defconfigs: enable CONFIG_NETFILTER_XT_TARGET_TCPMSS

Change-Id: I547fccfe5c3a841d1f1137bad7561e17126da08b
Bluetooth: Remove unused hci_le_ltk_reply()

In this API, we were using sizeof operator for an array
given as function argument, which is invalid.
However this API is not used anywhere.

Change-Id: I80a43472b35f0f6c117624de2b2907b37eefb786
Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
msm: vidc: Change inline functions to function macros

Stripped out kernel headers remove the function definitions
so changing these functions to macros.

Change-Id: I550157301b92855eaf2fbb92bcba050f84fe0b95
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
Signed-off-by: Praveen Chavan <pchavan@codeaurora.org>
msm: vidc: update with fixes and enhancements

Add LTR support for video encoder.
Add control to enable Hierarchical P num.
Enable vp8 error resilience support.
Avoid re-initialize of v4l2 spin lock.
Fix a race condition with core instances list
Add VP8 QP min and max control.
Add support to set VP8 QP range.
Update msm_media_info with MV Color format.
Cleanup v4l2 buffer flags.
Don't erase buffer flags in EBD
Rewrite v4l2 cluster construction
Detect mbaff information from firmware
Add support for setting initial qp
Configure and set hier-p layers
Fix a race condition in cluster construction
Indicate secure sessions in debugfs
Remove non fatal error messages
Query deblocker parameters from cluster
Set error concealment color to FW
Added v4l2 control to set the color of concealed MBs.
Disable Hier-P when LTR is enabled

Signed-off-by: Praveen Chavan <pchavan@codeaurora.org>
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
defconfigs: Disable CONFIG_IP_MULTICAST

Change-Id: Id5197005bb15f57188c9eb28a94abece36885d63
WLAN subsystem: Sysctl support for key TCP/IP parameters

It has been observed that default values for some of key tcp/ip
parameters are affecting the tput/performance of the system. Hence
extending configuration capabilities to TCP/Ip stack through
sysctl interface

CRs-Fixed: 507581

Change-Id: Ibaf821fcac9fba6448c5c23aef9d72946808e3cf
Signed-off-by: Kiran Kumar Lokere <klokere@codeaurora.org>
tcp: add a sysctl to config the tcp_default_init_rwnd

The default initial rwnd is hardcoded to 10.

Now we allow it to be controlled via
  /proc/sys/net/ipv4/tcp_default_init_rwnd
which limits the values from 3 to 100

This is somewhat needed because ipv6 routes are
autoconfigured by the kernel.

See "An Argument for Increasing TCP's Initial Congestion Window"
in https://developers.google.com/speed/articles/tcp_initcwnd_paper.pdf

Change-Id: I386b2a9d62de0ebe05c1ebe1b4bd91b314af5c54
Signed-off-by: JP Abgrall <jpa@google.com>

Conflicts:
	include/net/tcp.h
msm: Create shadow files under /sys/kernel/ipv4

The TCP delayed ack parameters can be configured from user space
application which runs with non-root credentials and does not have
direct write access to /proc entries. This commit creates shadow
files under /sys/kernel/ipv4 which maps to /proc/sys/net/ipv4.

CRs-Fixed: 628139
Change-Id: Ib7242aaae930dbc02133e44c04e182ebc52bc89f
Signed-off-by: Ravi Joshi <ravij@codeaurora.org>
net: support marking accepting TCP sockets

When using mark-based routing, sockets returned from accept()
may need to be marked differently depending on the incoming
connection request.

This is the case, for example, if different socket marks identify
different networks: a listening socket may want to accept
connections from all networks, but each connection should be
marked with the network that the request came in on, so that
subsequent packets are sent on the correct network.

This patch adds a sysctl to mark TCP sockets based on the fwmark
of the incoming SYN packet. If enabled, and an unmarked socket
receives a SYN, then the SYN packet's fwmark is written to the
connection's inet_request_sock, and later written back to the
accepted socket when the connection is established.  If the
socket already has a nonzero mark, then the behaviour is the same
as it is today, i.e., the listening socket's fwmark is used.

Black-box tested using user-mode linux:

- IPv4/IPv6 SYN+ACK, FIN, etc. packets are routed based on the
  mark of the incoming SYN packet.
- The socket returned by accept() is marked with the mark of the
  incoming SYN packet.
- Tested with syncookies=1 and syncookies=2.

Change-Id: I5e8c9b989762a93f3eb5a0c1b4df44f62d57f3cb
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
ping: always initialize ->sin6_scope_id and ->sin6_flowinfo

[msm/android-3.4 commit 14e41a18688ec8d52ea3163f7898455b52365854]

If we don't need scope id, we should initialize it to zero.
Same for ->sin6_flowinfo.

Bug: 9469865
Change-Id: I4e4c70a0e27206f472363dbd0c96ebbdfe2db167
Cc: Lorenzo Colitti <lorenzo@google.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Acked-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>