Commit Graph

253854 Commits

Author SHA1 Message Date
Colin Cross
99e01b39d9 net: ipv4: tcp: Fix crash in tcp_nuke_addr
ip_route_output_key can return an ERR_PTR, don't dereference it.

Change-Id: I6b86a451b2bdb33873d79b3cf90c11dbe72bc081
Signed-off-by: Colin Cross <ccross@android.com>
2011-06-22 14:42:06 -07:00
Dmitry Shmidt
af21159d1d net: wireless: bcmdhd: Fix failure in register_sysctl_table() call
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-21 17:10:06 -07:00
Dmitry Shmidt
4aac14eac6 net: wireless: bcmdhd: Fix 3.0 compilation for CFG80211
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-20 17:01:22 -07:00
JP Abgrall
8c7bad8b84 netfilter: have ip*t REJECT set the sock err when an icmp is to be sent
Allow the REJECT --reject-with icmp*blabla to also set the matching error
locally on the socket affected by the reject.
This allows the process to see an error almost as if it received it
via ICMP.
It avoids the local process who's ingress packet is rejected to have to
wait for a pseudo-eternity until some timeout kicks in.

Ideally, this should be enabled with a new iptables flag similar to
   --reject-with-sock-err
For now it is enabled with CONFIG_IP*_NF_TARGET_REJECT_SKERR option.

Change-Id: I649a4fd5940029ec0b3233e5abb205da6984891e
Signed-off-by: JP Abgrall <jpa@google.com>
2011-06-20 13:15:47 -07:00
JP Abgrall
934abcf52a netfilter: add xt_qtaguid matching module
This module allows tracking stats at the socket level for given UIDs.
It replaces xt_owner.
If the --uid-owner is not specified, it will just count stats based on
who the skb belongs to. This will even happen on incoming skbs as it
looks into the skb via xt_socket magic to see who owns it.
If an skb is lost, it will be assigned to uid=0.

To control what sockets of what UIDs are tagged by what, one uses:
  echo t $sock_fd $accounting_tag $the_billed_uid \
     > /proc/net/xt_qtaguid/ctrl
 So whenever an skb belongs to a sock_fd, it will be accounted against
   $the_billed_uid
  and matching stats will show up under the uid with the given
   $accounting_tag.

Because the number of allocations for the stats structs is not that big:
  ~500 apps * 32 per app
we'll just do it atomic. This avoids walking lists many times, and
the fancy worker thread handling. Slabs will grow when needed later.

It use netdevice and inetaddr notifications instead of hooks in the core dev
code to track when a device comes and goes. This removes the need for
exposed iface_stat.h.

Put procfs dirs in /proc/net/xt_qtaguid/
  ctrl
  stats
  iface_stat/<iface>/...
The uid stats are obtainable in ./stats.

Change-Id: I01af4fd91c8de651668d3decb76d9bdc1e343919
Signed-off-by: JP Abgrall <jpa@google.com>
2011-06-20 13:15:08 -07:00
JP Abgrall
d8cfaaaf68 nf: xt_socket: export the fancy sock finder code
The socket matching function has some nifty logic to get the struct sock
from the skb or from the connection tracker.
We export this so other xt_* can use it, similarly to ho how
xt_socket uses nf_tproxy_get_sock.

Change-Id: I11c58f59087e7f7ae09e4abd4b937cd3370fa2fd
Signed-off-by: JP Abgrall <jpa@google.com>
2011-06-20 13:15:08 -07:00
Mike Lockwood
cf7addf29b USB: gadget: f_mtp: Add PTP variant of MTP USB function
This is the same as MTP but with PTP interface descriptor.
Also removed obsolete ioctl for switching between MTP and PTP mode

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-17 22:27:20 -04:00
Mike Lockwood
ba3673bf79 USB: gadget: f_mtp: Add support for queueing multiple interrupt requests
Fixes problem sending "store added" events when there are multiple stores

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-17 22:27:20 -04:00
Benoit Goby
aab96815ae usb: gadget: android: Update android gadget driver
* Functions and the device descriptor are configured from user space:
echo 0       > /sys/class/android_usb/android0/enable
echo adb,acm > /sys/class/android_usb/android0/functions
echo 2       > /sys/class/android_usb/android0/f_acm/instances
echo 1       > /sys/class/android_usb/android0/enable

* Driver does not require platform data anymore

* Moved function initialization to android.c instead of each
function file

* Replaced switches by uevents

Signed-off-by: Benoit Goby <benoit@android.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
Change-Id: If5ad9267c111ad0a442f0d87a0d31082dc5381b6
2011-06-17 16:02:37 -07:00
Benoit Goby
94df1bdfdc usb: gadget: composite: Add usb_remove_config
This allows composite drivers to dynamically change their configuration.
For example, a driver might remove a configuration and register a new
one with a different set of functions.
User should prevent the host from enumerating the device while changing
the configuration:

	usb_gadget_disconnect(cdev->gadget);
	usb_remove_config(cdev, old_config);
	usb_add_config(cdev, new_config, new_conf_bind);
	usb_gadget_connect(cdev->gadget);

Change-Id: Icbfb4ce41685fde9bf63d5d58fca1ad242aa69f9
Signed-off-by: Benoit Goby <benoit@android.com>
2011-06-17 16:02:36 -07:00
Benoit Goby
f6e7d49e03 usb: gadget: f_rndis: fix unbind
Change-Id: Idfde1aee6cfd7c648d4100060e111798c405e32c
Signed-off-by: Benoit Goby <benoit@android.com>
2011-06-17 16:02:35 -07:00
Mike Lockwood
9902e0b5c5 USB: gadget: f_accessory: New gadget driver for android USB accesories
Signed-off-by: Mike Lockwood <lockwood@android.com>

USB: gadget: f_accessory: Misc improvements and cleanup:

- Add URI string

- Replace type string with a description string

- Add a control call to retrieve accessory protocol version (currently 1)

- Driver read() and write() calls now fail after USB disconnect until
  driver file is closed and reopened.

- Misc cleanup work

Signed-off-by: Mike Lockwood <lockwood@android.com>

USB: gadget: f_accessory: Clear accessory strings when USB is disconnected

Signed-off-by: Mike Lockwood <lockwood@android.com>

USB: gadget: f_accessory: Clear previous strings on ACCESSORY_GET_PROTOCOL

Clearing strings on disconnect does not work since we may receive
a disconnect on some devices when transitioning into accessory mode.
We require an accessory to send ACCESSORY_GET_PROTOCOL before
sending any strings, so any strings from a previous session will be cleared.

Signed-off-by: Mike Lockwood <lockwood@android.com>

USB: gadget: f_accessory: Clear disconnected flag when driver file is opened

Fixes a race condition that can occur when entering accessory mode.

Signed-off-by: Mike Lockwood <lockwood@android.com>

USB: gadget: f_accessory: Add string for accessory's unique serial number

Signed-off-by: Mike Lockwood <lockwood@android.com>

USB: gadget: f_accessory: Set bNumEndpoints to correct value of 2

Change-Id: I24f4e36f196d45436e0573301500c3b93215953d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-17 16:02:31 -07:00
Howard M. Harte
0d9f3c2791 net: wireless: bcmdhd: Combined patch from 4.218.248-31
bcmdhd: Allocate skb with GFP_KERNEL flag if possible: fix for older kernels.
bcmdhd: Fix race conditions for sysioc_thread
    * Fix up formatting and #ifdefs.
net: wireless: bcmdhd: Fix get_customized_country_code() for older kernels.
net: wireless: bcmdhd: Move PNO function prototypes to dhd.h.
Add private command support.
net: wireless: bcmdhd: Set proper read barrier
net: wireless: bcmdhd: Fix memory leak in case of dhd_bus_init() failure
net: wireless: bcmdhd: Fix wake_lock symmetry
net: wireless: bcmdhd: Ignore error if scan results are empty
net: wireless: bcmdhd: Add sdlock to firmware loading
net: wireless: bcmdhd: Fix watchdog syncronization during start/stop
net: wireless: bcmdhd: Fix Makefile to allow WEXT compilation

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-17 10:42:54 -07:00
Todd Poynor
097d39641d cpufreq interactive: support shared CPU scaling
Change-Id: Id5267f04067bf023f6b140b4de2e88ef7287e941
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-06-16 15:17:53 -07:00
Stephen Warren
390f202e3a ASoC: core: Don't schedule deferred_resume_work twice
For cards that have two or more DAIs, snd_soc_resume's loop over all
DAIs ends up calling schedule_work(deferred_resume_work) once per DAI.
Since this is the same work item each time, the 2nd and subsequent
calls return 0 (work item already queued), and trigger the dev_err
message below stating that a work item may have been lost.

Solve this by adjusting the loop to simply calculate whether to run the
resume work immediately or defer it, and then call schedule work (or not)
one time based on that.

Note: This has not been tested in mainline, but only in chromeos-2.6.38;
mainline doesn't support suspend/resume on Tegra, nor does the mainline
Tegra ASoC driver contain multiple DAIs. It has been compile-checked in
mainline.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Change-Id: I9c29b6c310a94108d81ab6506eb64ee9f30d846a
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-06-16 14:55:41 -07:00
Dmitry Shmidt
170372e4ab net: wireless: bcmdhd: Fix getting Mac address from platform data
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-15 17:21:00 -07:00
Dmitry Shmidt
a70ab7beb4 net: wireless: bcmdhd: Fix race conditions for sysioc_thread
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-15 17:20:58 -07:00
Dmitry Shmidt
d530ae0780 net: wireless: bcmdhd: Reduce listen interval to 10 (from 20)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-15 17:20:55 -07:00
Dmitry Shmidt
de0932bf1a net: wireless: bcmdhd: Prevent working thread to run during suspend path
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-15 17:20:54 -07:00
Dmitry Shmidt
63a3dfafbc net: wireless: bcmdhd: Allocate skb with GFP_KERNEL flag if possible
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-15 17:20:52 -07:00
Dmitry Shmidt
1154e25e0f net: wireless: bcmdhd: Fix memleak in dev->p
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-15 17:20:51 -07:00
Dmitry Shmidt
d38c274feb net: wireless: bcmdhd: Fix scan timeout for abg case
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 11:38:53 -07:00
Colin Cross
abbb445f65 HACK: time: Disable alarmtimer
kernel/time/alarmtimer.c conflicts with drivers/rtc/alarm.c,
disable it for now.

Change-Id: I6cdb3b885828d45836a54971adf16143039b0a0e
Signed-off-by: Colin Cross <ccross@android.com>
2011-06-14 11:37:53 -07:00
Jeff Brown
4700c54b66 input: gpio_input: send input_sync after reporting keys
Signed-off-by: jeffbrown@android.com
Change-Id: Ie170960df3c8ab4833ed686135dc8575cb9f2d48
2011-06-14 09:11:54 -07:00
Jeff Brown
be4cb21cb0 input: gpio_matrix: send input_sync after reporting keys
Signed-off-by: jeffbrown@android.com
Change-Id: I9bd2437503b48bf37f4d93505ccd2806e4aab977
2011-06-14 09:11:47 -07:00
Dmitry Shmidt
f53ef0328a net: wireless: bcmdhd: Prevent using WEXT in case of CFG80211
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:09 -07:00
Dmitry Shmidt
4cd8e372ad net: wireless: bcmdhd: Add missing dhd_get_dtim_skip() declaration
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:09 -07:00
Dmitry Shmidt
888da92e6c net: wireless: bcmdhd: Get rid of ANDROID define
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:09 -07:00
Dmitry Shmidt
d44b8ffa4b net: wireless: bcmdhd: Add setting country code from platform data
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:08 -07:00
Dmitry Shmidt
2b51d0d21f net: wireless: bcmdhd: Fix SOFTAP compilation
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:08 -07:00
Dmitry Shmidt
391df33a28 net: wireless: bcmdhd: Get MAC from platform data
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:08 -07:00
Dmitry Shmidt
fdfcb12df1 net: wireless: bcmdhd: Fix ANDROID define, clean obsolete code
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:08 -07:00
Howard M. Harte
b2fdbcd311 Update to 5.90.125.27 release.
Change-Id: I593f4a90671468b486e5f39b9eeff8ae65ac9431
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
2011-06-14 09:10:07 -07:00
mhban
36cf5520be printk: do not handle non-sleepable notification in console_cpu_notify
- CPU_DYING should not be handled in sleepable context

Signed-off-by: Minho Ban <mhban@samsung.com>
2011-06-14 09:10:07 -07:00
Dmitry Shmidt
37b0597b0f net: wireless: Add CONFIG_WIFI_CONTROL_FUNC option
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:07 -07:00
Dmitry Shmidt
adc1d7a7a5 net: wireless: bcmdhd: Switch to CUSTOMER_HW2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:07 -07:00
Dmitry Shmidt
8d91cafd81 net: wireless: bcmdhd: Remove obsolete debug messages
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:06 -07:00
Dmitry Shmidt
77a870da2e net: wireless: bcmdhd: Allow error debug prints from the beginning
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:06 -07:00
Dmitry ORNATSKYY
e02edfa975 net: wireless: bcm4329: Update example locale table
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:06 -07:00
Dmitry ORNATSKYY
9d5a8b6db6 net: wireless: bcm4329: Reduce listen interval to 10 (from 20)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:04 -07:00
Dmitry Shmidt
9a71fde4d7 net: wireless: bcm4329: Add new and default wifi locale support
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:02 -07:00
Dmitry Shmidt
252a091c47 net: wireless: bcmdhd: Fix watchdog firing in softirq on removal
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:02 -07:00
Dmitry Shmidt
6e66cd6a2d net: wireless: bcmdhd: Allow WEXT support
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:02 -07:00
Dmitry Shmidt
c2151241ce net: wireless: bcmdhd: Fix params in wl_cfg80211_event call
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:01 -07:00
Dmitry Shmidt
bce30c12f0 net: wireless: bcmdhd: Add spinlock initialization
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:01 -07:00
Dmitry Shmidt
6db994e17e net: wireless: bcmdhd: Fix config FW and NVRAM path
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:01 -07:00
Howard M. Harte
cf77d4ca64 Update to 5.90.125.22:
* Add support for SoftAP, keepalive, ARP offload.
    * Clean up cfg80211 and p2p code.
    * Update Makefile to support new features.
Change-Id: I1e7a16acd400d7baf5625ca8ba6552a6f1c80661
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
2011-06-14 09:10:01 -07:00
Dmitry Shmidt
66eb9faefb net: wireless: bcmdhd: Initial version based on 5.90.125.14
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:10:00 -07:00
Arve Hjønnevåg
38dfc33b20 ARM: etm: Power down etm(s) when tracing is not enabled
Without this change a saw an 18% increase in idle power consumption
on one deivce when trace support is compiled into the kernel. Now
I see the same increase only when tracing.

Change-Id: I21bb5ecf1b7d29ce3790ceeb5323409cc22d5a3b
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:10:00 -07:00
Arve Hjønnevåg
628c494e44 ARM: etm: Support multiple ETMs/PTMs.
If more than one ETM or PTM are present, configure all of them
and enable the formatter in the ETB. This allows tracing on dual
core systems (e.g. omap4).

Change-Id: I028657d5cf2bee1b23f193d4387b607953b35888
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:10:00 -07:00