xt_socket is useful for matching sockets with IP_TRANSPARENT and
taking some action on the matching packets. However, it lacks the
ability to match only a small subset of transparent sockets.
Suppose there are 2 applications, each with its own set of transparent
sockets. The first application wants all matching packets dropped,
while the second application wants them forwarded somewhere else.
Add the ability to retore the skb->mark from the sk_mark. The mark
is only restored if a matching socket is found and the transparent /
nowildcard conditions are satisfied.
Now the 2 hypothetical applications can differentiate their sockets
based on a mark value set with SO_MARK.
iptables -t mangle -I PREROUTING -m socket --transparent \
--restore-skmark -j action
iptables -t mangle -A action -m mark --mark 10 -j action2
iptables -t mangle -A action -m mark --mark 11 -j action3
Change-Id: Ica30d9303ac6bb265fce4ef095a952508b4a1f0c
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Git-commit: 01555e74bde51444c6898ef1800fb2bc697d479e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[harouth@codeaurora.org: resolve trivial merge conflicts]
commit 681f130f39e10 ("netfilter: xt_socket: add XT_SOCKET_NOWILDCARD
flag") added a potential NULL dereference if an old iptables package
uses v0 of the match.
Fix this by removing the test on @info in fast path.
IPv6 can remove the test as well, as it uses v1 or v2.
Change-Id: If883c48ec81335e6715311655d0ddc1c33401ec7
Reported-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Git-commit: baf60efa585c78b269f0097288868a51ccc61f55
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
xt_socket module can be a nice replacement to conntrack module
in some cases (SYN filtering for example)
But it lacks the ability to match the 3rd packet of TCP
handshake (ACK coming from the client).
Add a XT_SOCKET_NOWILDCARD flag to disable the wildcard mechanism.
The wildcard is the legacy socket match behavior, that ignores
LISTEN sockets bound to INADDR_ANY (or ipv6 equivalent)
iptables -I INPUT -p tcp --syn -j SYN_CHAIN
iptables -I INPUT -m socket --nowildcard -j ACCEPT
Change-Id: I5216b9c9b367cb1adbe74d47014a4155f6c39271
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Git-commit: 681f130f39e10087475383e6771b9366e26bab0c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[harouth@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
With IP early demux added in linux-3.6, we perform TCP lookup in IP
layer before iptables hooks.
We can avoid doing a second lookup in xt_socket.
Change-Id: I9a29233ab0acc40a528374910c010e383af3eaf3
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Git-commit: 00028aa37098168048728acc32ab0206687f2920
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[harouth@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
Keep optimum powerlevels for msm8976 to help
performance and power.
Change-Id: Ie387152c37b433b330fa360de15ddddbb11d2876
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
Different kernel version needs to use different kernel APIs for
hotplug. Add wrapper for CPU hotplug so that external module can be
used across different kernel releases.
Use cpu_up/cpu_down() API for CPU hotplug.
Change-Id: Ib36a875027f67b96e2d108de8b7d902978e50005
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
Extend PM_AWAKE and PM_RELAX interfaces to all misc drivers as to allow
their clients in user space to hold ARM core during time out count down.
Change-Id: I754f6198201e47826857459ef0fd18a7c7834310
Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
Add support for deferring touch resume to a workqueue on
msm8952 QRD and msm8976 QRD.
Change-Id: I718f2a5efc13c906025ad17932a36612b6115f8c
Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
Signed-off-by: zhaoyuan <yzhao@codeaurora.org>
During device resume, the touch resume function is called after display's
resume. In this case, the ft5x06's resume function needs to wait for
200ms because of reset requirement. Defer the touch resume to a workqueue
to reduce the total device resume time. For this an optional DT property
is added to enable this on targets that need this feature.
Change-Id: Ib0677ca792aea83ece1caf8a0afff341302747fb
Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
Signed-off-by: zhaoyuan <yzhao@codeaurora.org>
In the current implementation AICL is not re-run if its already
in progress. However in case where ICL gets updated while AICL
is in progress, the updated ICL value is not considered unless
AICL re-runs again. Handle this by re-running AICL irrespective of
the AICL status.
CRs-Fixed: 907473
Change-Id: I4a021e6ca148d0c218701cfb8a671d1e2dac6fee
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Enable AICL reruns for the PMi8950 smbcharger in order to allow it to
recover any current loss from glitchy AICL results.
Set the AICL rerun period to 180 seconds on PMI8950 to avoid waking
up all the time when charging.
CRs-Fixed: 920791
Change-Id: I24a734f3ed489ca50eb00aa9421816162c3fc9e5
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Add module parameters to configure default ICLs for USB DCP and HVDCPs
in order to facilitate testing.
CRs-Fixed: 930588
Change-Id: I5fa1cdef010821211d3baa1797fdb72110d86a10
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
Use the BATT_TYPE voter for FCC instead of USER. This way the user can
set FCCs higher than the device tree limit.
Change-Id: Id386f8afd1bef2d1774730b214f1b97d64a6476b
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
Support adjusting the usb ICL up and down through the DP_DM interface for
HVDCP 3.0.
CRs-Fixed: 930588
Change-Id: Ic24f946522d7ae0ec0a52f127118ac5a0d908277
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
Add the ICL_DOWN and ICL_UP enums for POWER_SUPPLY_PROP_DP_DM in order
to allow hvdcpd to configure the relative input current limit.
CRs-Fixed: 930588
Change-Id: I80e37e241e145a81d6defe69fe5cbab1127cf933
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
Current the smbcharger is splitting the ICL and charge current fairly
naively. This can cause problems where one charger is FCC limited and
another charger is ICL limited, causing a lot of wasted charge current.
Do a better current distribution to maximize the amount of charge
current going into the battery. By default, raise the ICL ratio of the
primary charger up to 60% to avoid issues with system load prematurely
causing the charger to current limit. Lower the FCC ratio back to 50% to
accommodate this.
Also, make both of these properties configurable through module
parameters and device tree in order to accommodate differences in pcb
and battery limitation.
CRs-Fixed: 930588
Change-Id: I77ec8483232e4297936baaad1e9bb4399474d444
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
At 9V, the smbcharger is more efficient at a switching frequency of
1MHz. Switch to this when the driver detects that it is in HVDCP 2.0
mode. Also, switch the VFIX clamping voltage threshold so that the
frequency is maintained.
CRs-Fixed: 910651
Change-Id: I4b8e1d360fe301671e882f20b2460cdb737204b0
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>