raw_ip_net: update driver to latest revision
raw_ip_net: allow driver to built in to kernel
usb: fix usb mass storage for aosp/sense
android: logger: enforce GID and CAP check on log flush

Restrict log flushing to those in the logs group, or
anyone with CAP_SYSLOG.

Change-Id: I5d6977d1c0d60ffe8487771cc195789e5db95454
Signed-off-by: Charndeep Grewal <csgrewa@tycho.ncsc.mil>
net: PPPoPNS and PPPoLAC update to use PPP_MRU instead of PPP_MRU

Some headers files were moved around and some defines renamed.

Signed-off-by: JP Abgrall <jpa@google.com>
netfilter: xt_qtaguid: fix error exit that would keep a spinlock.

qtudev_open() could return with a uid_tag_data_tree_lock held
when an kzalloc(..., GFP_ATOMIC) would fail.
Very unlikely to get triggered AND survive the mayhem of running out of mem.

Signed-off-by: JP Abgrall <jpa@google.com>
netfilter: qtaguid: Don't BUG_ON if create_if_tag_stat fails

If create_if_tag_stat fails to allocate memory (GFP_ATOMIC) the
following will happen:

qtaguid: iface_stat: tag stat alloc failed
...
kernel BUG at xt_qtaguid.c:1482!

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
netfilter: xt_qtaguid: fix ipv6 protocol lookup

When updating the stats for a given uid it would incorrectly assume
IPV4 and pick up the wrong protocol when IPV6.

Change-Id: Iea4a635012b4123bf7aa93809011b7b2040bb3d5
Signed-off-by: JP Abgrall <jpa@google.com>
netfilter: xt_qtaguid: start tracking iface rx/tx at low level

qtaguid tracks the device stats by monitoring when it goes up and down,
then it gets the dev_stats().
But devs don't correctly report stats (either they don't count headers
symmetrically between rx/tx, or they count internal control messages).

Now qtaguid counts the rx/tx bytes/packets during raw:prerouting and
mangle:postrouting (nat is not available in ipv6).

The results are in
  /proc/net/xt_qtaguid/iface_stat_fmt
which outputs a format line (bash expansion):
  ifname  total_skb_{rx,tx}_{bytes,packets}

Added event counters for pre/post handling.
Added extra ctrl_*() pid/uid debugging.

Change-Id: Id84345d544ad1dd5f63e3842cab229e71d339297
Signed-off-by: JP Abgrall <jpa@google.com>
ext4: add missing save_error_info() to ext4_error()

commit f3fc0210c0fc91900766c995f089c39170e68305 upstream.

The ext4_error() function is missing a call to save_error_info().
Since this is the function which marks the file system as containing
an error, this oversight (which was introduced in 2.6.36) is quite
significant, and should be backported to older stable kernels with
high urgency.

Change-Id: Ifd98e9021037dbf5b84152d8853b214248961794
Reported-by: Ken Sumrall <ksumrall@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: ksumrall@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ken Sumrall <ksumrall@android.com>
tegra_pcm: support audio up to 32bits
wl12xx: don't send the sleep_auth to FW on recovery

The FW doesn't seem to handle it gracefully, and it's redundant since
recovery will make us load a new FW anyway.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
wl12xx: disable arp filter only if configured

Disabling auto arp actually causes FW resources allocation
and it's better to avoid that unless an arp filter was
already configured (i.e. the interface had an IP configured).
This also prevents exceeding the FW arp filters limit (2)
in certain scenarios. Once such case which poses a problem
is having a P2P_GO with an associated client + a connected STA
concurrently. Once you disconnect the GO, for a brief moment
the interface is changed to STA before removal. This leads to
having 3 STA interfaces (the actual STA, P2P device and the
disconnected GO which turned into a STA) and would attempt
allocating 3 FW arp filters which fails.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
mac80211: mark the p2p0 interface with a special flag

This flag indicates the lower driver the interface will be used for
p2p management operations only (p2p find). This will be superseded
by pending upstream patches making p2p a wdev-only interface.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
wl12xx: enable the dev role on the p2p mgmt iface

When starting a p2p mgmt interface, enable its device role. This
is used to keep the FW Rx filters down for the p2p dev role MAC address.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
wl12xx: don't ROC or switch to MR on p2p mgmt on-chan Tx

When in the SR FW and Tx arrives on the p2p mgmt interface on the
same channel as an existing p2p role, don't switch to MR or ROC on
the newly started device role. Just start the device role and use it
for Tx. Do the ROC as usual in the MR FW.

This avoids problems during p2p operation, when we need to respond
to packets via the p2p-dev interface (i.e. provision discovery in GO).

Signed-off-by: Arik Nemtsov <arik@wizery.com>
wl12xx: Always pass DMA-able buffers to mmc functions

Some of the mmc drivers initiate DMA transfers with buffers passed from
higher layers. This means that the driver shouldn't ever pass non
DMA-able buffers, such as ones that are unaligned, allocated on the
stack or static.

Fix a couple of calls to the mmc layer in which buffers which weren't
necessarily DMA-able were passed.

Reported-by: "De Cesco, Jonathan" <jonathanc@ti.com>
Signed-off-by: Ido Yariv <ido@wizery.com>
Revert "wl12xx: fix BA session after AP recovery"

This reverts commit 5ec6973c0fd6f3d2744d174576beb2e7ad007e0b.
which introduced a bug where the hlid allocated for the sta during
reconfig wasn't saved in the ieee80211_sta which was passed
from mac80211. Instead a copy of ieee80211_sta was created and
maintained by wl12xx. This is wrong as mac80211 needs to be in
sync with us. The result could be attempting to free the wrong
hlid when mac80211 removes the sta among others. Fix this by
avoiding the copy and instead keep the pending peers list by
linking the driver private struct at the end of ieee80211_sta.

Another bug existed in wl1271_bss_info_changed_ap() where when
adding the peers the state was updated effectively only for the
first peer.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
mac80211: add stations after AP start on reconfig

When performing a HW restart for an AP mode interface, add stations back
only after the AP is beaconing. This mimics the normal flow of STA
addition on AP.

Some devices (wlcore) do not support adding stations before beaconing,
so this has the added benefit of making recovery work for them.

[Eyal - backported to R5]

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
mac80211: stop Rx during HW reconfig

While HW reconfig is in progress, drop all incoming Rx. This prevents
incoming packets from changing the internal state of the driver or
calling callbacks of the low level driver while it is in inconsistent
state.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>