7 years agonet: wireless: bcmdhd: Fix build break with newer versions of gcc
Rom Lemarchand [Wed, 13 Jul 2011 19:15:34 +0000]
net: wireless: bcmdhd: Fix build break with newer versions of gcc

In case the WPA cipher can't be determined the pval and gval variables don't
get updated which generates a warning in newer versions of gcc (tested with
4.5.2). Since the bcmdhd driver gets compiled with warnings treated as errors
this change is needed to fix the build.

Change-Id: Ia483777fee54ac526bb0db7c666fa2bf5df17354
Signed-off-by: Rom Lemarchand <rlemarchand@sta.samsung.com>

7 years agonet: wireless: bcm4329: Fix roaming message processing
Dmitry Shmidt [Wed, 13 Jul 2011 17:43:20 +0000]
net: wireless: bcm4329: Fix roaming message processing

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Add country private command
Dmitry Shmidt [Tue, 12 Jul 2011 18:19:48 +0000]
net: wireless: bcmdhd: Add country private command

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcm4329: Add packet filtering commands
Dmitry Shmidt [Tue, 12 Jul 2011 00:17:23 +0000]
net: wireless: bcm4329: Add packet filtering commands

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agocgroup: Add generic cgroup subsystem permission checks
Colin Cross [Wed, 13 Jul 2011 02:53:24 +0000]
cgroup: Add generic cgroup subsystem permission checks

Rather than using explicit euid == 0 checks when trying to move
tasks into a cgroup via CFS, move permission checks into each
specific cgroup subsystem. If a subsystem does not specify a
'allow_attach' handler, then we fall back to doing our checks
the old way.

Use the 'allow_attach' handler for the 'cpu' cgroup to allow
non-root processes to add arbitrary processes to a 'cpu' cgroup
if it has the CAP_SYS_NICE capability set.

This version of the patch adds a 'allow_attach' handler instead
of reusing the 'can_attach' handler.  If the 'can_attach' handler
is reused, a new cgroup that implements 'can_attach' but not
the permission checks could end up with no permission checks
at all.

Change-Id: Icfa950aa9321d1ceba362061d32dc7dfa2c64f0c
Original-Author: San Mehat <san@google.com>
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoRevert "cgroup: Add generic cgroup subsystem permission checks."
Colin Cross [Wed, 13 Jul 2011 03:12:45 +0000]
Revert "cgroup: Add generic cgroup subsystem permission checks."

This reverts commit 1d38bc7d0523af2233b4280e2aeab34c6a076665.

Change-Id: I2c5066b696cbdd5ca117ed74718bcb7e70e878e7
Signed-off-by: Colin Cross <ccross@android.com>

7 years agonetfitler: fixup the quota2, and enable.
JP Abgrall [Tue, 12 Jul 2011 19:02:59 +0000]
netfitler: fixup the quota2, and enable.

The xt_quota2 came from
  http://sourceforge.net/projects/xtables-addons/develop

It needed tweaking for it to compile within the kernel tree.
Fixed kmalloc() and create_proc_entry() invocations within
 a non-interruptible context.
Removed useless copying of current quota back to the iptable's
struct matchinfo:
  - those are per CPU: they will change randomly based on which
    cpu gets to update the value.
  - they prevent matching a rule: e.g.
      -A chain -m quota2 --name q1 --quota 123
     can't be followed by
      -D chain -m quota2 --name q1 --quota 123
    as the 123 will be compared to the struct matchinfo's quota member.

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

7 years agonetfilter: adding the original quota2 from xtables-addons
JP Abgrall [Tue, 21 Jun 2011 18:14:49 +0000]
netfilter: adding the original quota2 from xtables-addons

The original xt_quota in the kernel is plain broken:
  - counts quota at a per CPU level
    (was written back when ubiquitous SMP was just a dream)
  - provides no way to count across IPV4/IPV6.

This patch is the original unaltered code from:
  http://sourceforge.net/projects/xtables-addons

  at commit e84391ce665cef046967f796dd91026851d6bbf3

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

7 years agoUSB: otg: add otg id notifier utiltiies
Colin Cross [Fri, 24 Jun 2011 22:58:51 +0000]
USB: otg: add otg id notifier utiltiies

Add a otg_id notifier to allow multiple drivers to cooperate to
determine the type of cable connected to a USB connector without
requiring direct calls between the drivers.

Change-Id: Ic5675f1a89daf85b17336765de24e4bdb6df6348
Signed-off-by: Colin Cross <ccross@android.com>

7 years agopda_power: add support for using otg transceiver events
Dima Zavin [Fri, 8 Jul 2011 06:20:27 +0000]
pda_power: add support for using otg transceiver events

If the platform data sets the use_otg_notifier flag,
the driver will now register an otg notifier callback and listen
to transceiver events for AC/USB plug-in events instead. This would
normally be used by not specifying is_xx_online callbacks and
not specifying any irqs so the state machine is completely driven
from OTG xceiver events.

Change-Id: Ic4b3bc4010f299156e41fd2411696c7ff5a88e92
Signed-off-by: Dima Zavin <dima@android.com>

7 years agoBluetooth: Add support for SMP timeout
Vinicius Costa Gomes [Tue, 14 Jun 2011 16:37:41 +0000]
Bluetooth: Add support for SMP timeout

This patch adds support for disconnecting the link when SMP procedure
takes more than 30 seconds.

SMP begins when either the Pairing Request command is sent or the
Pairing Response is received, and it ends when the link is encrypted
(or terminated). Vol 3, Part H Section 3.4.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>

7 years agoBluetooth: Clean up some code style issues
Waldemar Rymarkiewicz [Tue, 7 Jun 2011 09:18:06 +0000]
Bluetooth: Clean up some code style issues

Fix lines longer than 80 chars in length.

Change-Id: I448077965c5f7723a4a9537977bfa664cfe104fd
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>

7 years agonet: wireless: bcmdhd: Fix crash if event queue is empty
Dmitry Shmidt [Mon, 11 Jul 2011 17:48:09 +0000]
net: wireless: bcmdhd: Fix crash if event queue is empty

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Fix CFG80211 suspend/resume if interface is down
Dmitry Shmidt [Mon, 11 Jul 2011 17:45:33 +0000]
net: wireless: bcmdhd: Fix CFG80211 suspend/resume if interface is down

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Add setband/getband private commands
Dmitry Shmidt [Fri, 8 Jul 2011 22:33:58 +0000]
net: wireless: bcmdhd: Add setband/getband private commands

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Add packet filtering commands
Dmitry Shmidt [Fri, 8 Jul 2011 00:04:44 +0000]
net: wireless: bcmdhd: Add packet filtering commands

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agogpu: ion: Validate handles passed via the kernel api
Rebecca Schultz Zavin [Fri, 8 Jul 2011 00:07:56 +0000]
gpu: ion: Validate handles passed via the kernel api

Before freeing or sharing handles, confirm that they
are valid in the provided client

Change-Id: I06ec599c0b277fcb5417325a12ecbf8b2d248a7b
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agonet: wireless: bcmdhd: Fix private command output
Dmitry Shmidt [Thu, 7 Jul 2011 21:57:23 +0000]
net: wireless: bcmdhd: Fix private command output

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonetfitler: xt_qtaguid: add another missing spin_unlock.
JP Abgrall [Thu, 7 Jul 2011 03:09:38 +0000]
netfitler: xt_qtaguid: add another missing spin_unlock.

This time the symptom is caused by tagging the same socket twice
without untagging it in between.
This would cause it to not unlock, and return.

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

7 years agoion: fix ION_HEAP_<xxx>_MASK definitions
Iliyan Malchev [Wed, 6 Jul 2011 23:53:21 +0000]
ion: fix ION_HEAP_<xxx>_MASK definitions

Signed-off-by: Iliyan Malchev <malchev@google.com>

7 years agoUSB: OTG: Take wakelock when VBUS present
Todd Poynor [Sat, 2 Jul 2011 00:19:56 +0000]
USB: OTG: Take wakelock when VBUS present

Enabled by default, can disable with:
   echo N > /sys/module/otg_wakelock/parameters/enabled

Change-Id: I34974624c52ae23490852b44c270d2f326cf6116
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agogpu: ion: Fix deferencing ERR_PTR
Choi, Jong-Hwan [Thu, 7 Jul 2011 00:07:04 +0000]
gpu: ion: Fix deferencing ERR_PTR

Change-Id: I986c380d75591571890f1a2cba1405e66789b25c
Signed-off-by: Choi, Jong-Hwan <jhbird.choi@samsung.com>

7 years agogpu: ion: Fix possible memory leak
Choi, Jong-Hwan [Thu, 7 Jul 2011 00:06:17 +0000]
gpu: ion: Fix possible memory leak

Change-Id: I66f5ad2c95513dfab9f4fc5ae2fcb1316f486d34
Signed-off-by: Choi, Jong-Hwan <jhbird.choi@samsung.com>

7 years agogpu: ion: Remove redunant code from ion_open
Rebecca Schultz Zavin [Thu, 7 Jul 2011 01:07:24 +0000]
gpu: ion: Remove redunant code from ion_open

ion_client_create now does a lookup, so this need not
also be done from ion_open

Change-Id: Icb101bbf514bf2e40b4b5d9b320130bf185349aa
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agogpu: ion: Fix bug in ion client destroy
Rebecca Schultz Zavin [Thu, 7 Jul 2011 01:07:01 +0000]
gpu: ion: Fix bug in ion client destroy

ion_client_destroy kernel api should only delete the client
if it's refcount has gone to zero.

Change-Id: Iaa662bd82d67279a9807e01f9a24aebe3d21c17d
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agonetfilter: qtaguid: fix bad-arg handling when tagging socket
JP Abgrall [Wed, 6 Jul 2011 19:05:49 +0000]
netfilter: qtaguid: fix bad-arg handling when tagging socket

When processing args passed to the procfs ctrl, if the tag was
invalid it would exit without releasing the spin_lock...
Bye bye scheduling.

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

7 years agogpu: ion: Fix bug in ion_client_create
Rebecca Schultz Zavin [Sat, 2 Jul 2011 03:41:25 +0000]
gpu: ion: Fix bug in ion_client_create

If a process already had a client, ion_client_create
would loop forever.

Change-Id: I723207b5872dfc11be04ca27d38a3cf39c4a1426
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agonet: wireless: bcmdhd: Set interface name to 'wlan' by default
Dmitry Shmidt [Thu, 30 Jun 2011 21:05:42 +0000]
net: wireless: bcmdhd: Set interface name to 'wlan' by default

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Fix pm_notifier unregistration
Dmitry Shmidt [Thu, 30 Jun 2011 17:09:06 +0000]
net: wireless: bcmdhd: Fix pm_notifier unregistration

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Postpone driver init call
Dmitry Shmidt [Thu, 30 Jun 2011 17:04:16 +0000]
net: wireless: bcmdhd: Postpone driver init call

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Add private start/stop commands
Dmitry Shmidt [Thu, 30 Jun 2011 16:54:27 +0000]
net: wireless: bcmdhd: Add private start/stop commands

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Fix MAC address setting
Dmitry Shmidt [Wed, 29 Jun 2011 23:03:25 +0000]
net: wireless: bcmdhd: Fix MAC address setting

If MAC address setting fails from wifi_get_mac_addr() it will be picked up
from nvram.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agoUpdate to 5.90.125.33
Greg Goldman [Wed, 29 Jun 2011 21:34:18 +0000]
Update to 5.90.125.33
Add logic to get MAC address before firmware is loaded

Change-Id: I2151a0fcc5aab914cfec8bfedf761b9f06445d1a
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Add SETFWPATH private command
Dmitry Shmidt [Tue, 28 Jun 2011 22:09:49 +0000]
net: wireless: bcmdhd: Add SETFWPATH private command

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Fix wd_timer_valid field protection
Dmitry Shmidt [Tue, 28 Jun 2011 20:57:55 +0000]
net: wireless: bcmdhd: Fix wd_timer_valid field protection

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agoUpdate to 5.90.125.32:
Lin Ma [Tue, 28 Jun 2011 01:53:59 +0000]
Update to 5.90.125.32:
* Move Android specific functions to wl_android (wifi control functions,
  wifi device, pre-alloc buffer.)
* Link Android start/stop commands to interface up/down (download firmware
  when primary interfacde is up.)
* Fix a issue in driver unload, the same IRQ can not be disabled twice
  (set_irq_wake)

Change-Id: Id49c4f746f69371323c9a34834c3b628b78ff713
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agogpu: ion: Remove incorrect error message
Rebecca Schultz Zavin [Fri, 1 Jul 2011 02:16:59 +0000]
gpu: ion: Remove incorrect error message

The function name is wrong here, and this function may
sometimes be called to see if a value passed from userspace
is an ion handle.  Since it's not really an error when it
fails, remove the log message.

Change-Id: I7bee0e7ffb72b4c4768774a3586f97e306700c21
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agogpu: ion: Fix bug in ion_buffer_add
Rebecca Schultz Zavin [Fri, 1 Jul 2011 01:09:05 +0000]
gpu: ion: Fix bug in ion_buffer_add

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agogpu: ion: Several fixes
Rebecca Schultz Zavin [Thu, 30 Jun 2011 19:19:55 +0000]
gpu: ion: Several fixes

Fix some cases where locks were not released on error paths
Change heap->prio to heap->id to make meaning clearer
Fix kernel doc to match sources

7 years agogpu: ion: Add ION Memory Manager
Rebecca Schultz Zavin [Thu, 30 Jun 2011 02:44:29 +0000]
gpu: ion: Add ION Memory Manager

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agoRevert "PM: Prevent waiting forever on asynchronous resume after abort"
Colin Cross [Wed, 29 Jun 2011 20:43:12 +0000]
Revert "PM: Prevent waiting forever on asynchronous resume after abort"

This reverts commit fa92a3d6959546baa27e892188d3e9bb79c31741.

7 years agoRevert "PM: Wait for completion of the parent resume before resuming"
Colin Cross [Wed, 29 Jun 2011 20:42:56 +0000]
Revert "PM: Wait for completion of the parent resume before resuming"

This reverts commit a0f07aae54e87a9fad6d19c0e57398f54d858f06.

7 years agonf: qtaguid: make procfs entry for ctrl return correct data.
JP Abgrall [Tue, 28 Jun 2011 06:31:46 +0000]
nf: qtaguid: make procfs entry for ctrl return correct data.

(This is a direct cherry-pick from 2.6.39: I3b925802)

Fixed procreader for /proc/net/xt_qtaguid/ctrl: it would just
fill the output with the same entry.
Simplify the **start handling.

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

7 years agonf: qtaguid: workaround xt_socket_get_sk() returning bad SKs.
JP Abgrall [Tue, 28 Jun 2011 04:03:04 +0000]
nf: qtaguid: workaround xt_socket_get_sk() returning bad SKs.

(This is a direct cherry pick from 2.6.39: Id2a9912b)

* xt_socket_get_sk() returns invalid sockets when the sk_state is TCP_TIME_WAIT.
Added detection of time-wait.
* Added more constrained usage: qtaguid insures that xt_socket_get*_sk() is
not invoked for unexpected hooks or protocols (but I have not seen those
active at the point where the returned sk is bad).

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

7 years agonet: wireless: bcmdhd: Fix memory poisoning in wl_free_wdev()
Dmitry Shmidt [Fri, 24 Jun 2011 17:16:22 +0000]
net: wireless: bcmdhd: Fix memory poisoning in wl_free_wdev()

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Set proper debug messages for private IOCTL
Dmitry Shmidt [Thu, 23 Jun 2011 17:41:27 +0000]
net: wireless: bcmdhd: Set proper debug messages for private IOCTL

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agomm: ashmem: Fix arguments to ashmem_shrink
Colin Cross [Wed, 22 Jun 2011 23:05:47 +0000]
mm: ashmem: Fix arguments to ashmem_shrink

The arguments to shrink functions have changed, update
ashmem_shrink to match.

Change-Id: Id279d22d761a2a7c4965c957960eef804d06cc07
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoandroid: lowmemorykiller: Fix arguments to lowmem_shrink
Colin Cross [Wed, 22 Jun 2011 23:05:47 +0000]
android: lowmemorykiller: Fix arguments to lowmem_shrink

The arguments to shrink functions have changed, update
lowmem_shrink to match.

Change-Id: I48f436e0509c416dc0b18db500234f7b1d6d42e1
Signed-off-by: Colin Cross <ccross@android.com>

7 years agonet: wireless: bcmdhd: Add RSSI and SETSUSPENDOPT private commands
Dmitry Shmidt [Wed, 22 Jun 2011 18:06:16 +0000]
net: wireless: bcmdhd: Add RSSI and SETSUSPENDOPT private commands

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: ipv4: tcp: Fix crash in tcp_nuke_addr
Colin Cross [Wed, 22 Jun 2011 21:27:37 +0000]
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>

7 years agonet: wireless: bcmdhd: Fix failure in register_sysctl_table() call
Dmitry Shmidt [Tue, 21 Jun 2011 23:19:35 +0000]
net: wireless: bcmdhd: Fix failure in register_sysctl_table() call

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Fix 3.0 compilation for CFG80211
Dmitry Shmidt [Mon, 20 Jun 2011 20:54:48 +0000]
net: wireless: bcmdhd: Fix 3.0 compilation for CFG80211

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonetfilter: have ip*t REJECT set the sock err when an icmp is to be sent
JP Abgrall [Thu, 16 Jun 2011 21:37:03 +0000]
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>

7 years agonetfilter: add xt_qtaguid matching module
JP Abgrall [Mon, 20 Jun 2011 19:41:46 +0000]
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>

7 years agonf: xt_socket: export the fancy sock finder code
JP Abgrall [Wed, 15 Jun 2011 23:52:40 +0000]
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>

7 years agoUSB: gadget: f_mtp: Add PTP variant of MTP USB function
Mike Lockwood [Thu, 2 Jun 2011 02:17:36 +0000]
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>

7 years agoUSB: gadget: f_mtp: Add support for queueing multiple interrupt requests
Mike Lockwood [Mon, 2 May 2011 00:36:19 +0000]
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>

7 years agousb: gadget: android: Update android gadget driver
Benoit Goby [Wed, 20 Apr 2011 03:37:33 +0000]
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

7 years agousb: gadget: composite: Add usb_remove_config
Benoit Goby [Thu, 26 May 2011 06:59:43 +0000]
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>

7 years agousb: gadget: f_rndis: fix unbind
Benoit Goby [Wed, 1 Jun 2011 01:25:06 +0000]
usb: gadget: f_rndis: fix unbind

Change-Id: Idfde1aee6cfd7c648d4100060e111798c405e32c
Signed-off-by: Benoit Goby <benoit@android.com>

7 years agoUSB: gadget: f_accessory: New gadget driver for android USB accesories
Mike Lockwood [Wed, 2 Feb 2011 16:52:56 +0000]
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>

7 years agonet: wireless: bcmdhd: Combined patch from 4.218.248-31
Howard M. Harte [Thu, 16 Jun 2011 01:52:15 +0000]
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>

7 years agocpufreq interactive: support shared CPU scaling
Todd Poynor [Tue, 7 Jun 2011 01:30:23 +0000]
cpufreq interactive: support shared CPU scaling

Change-Id: Id5267f04067bf023f6b140b4de2e88ef7287e941
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agonet: wireless: bcmdhd: Fix getting Mac address from platform data
Dmitry Shmidt [Wed, 15 Jun 2011 22:20:55 +0000]
net: wireless: bcmdhd: Fix getting Mac address from platform data

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Fix race conditions for sysioc_thread
Dmitry Shmidt [Tue, 14 Jun 2011 00:33:26 +0000]
net: wireless: bcmdhd: Fix race conditions for sysioc_thread

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Reduce listen interval to 10 (from 20)
Dmitry Shmidt [Mon, 13 Jun 2011 23:49:08 +0000]
net: wireless: bcmdhd: Reduce listen interval to 10 (from 20)

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Prevent working thread to run during suspend path
Dmitry Shmidt [Mon, 13 Jun 2011 23:47:58 +0000]
net: wireless: bcmdhd: Prevent working thread to run during suspend path

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Allocate skb with GFP_KERNEL flag if possible
Dmitry Shmidt [Mon, 13 Jun 2011 23:42:13 +0000]
net: wireless: bcmdhd: Allocate skb with GFP_KERNEL flag if possible

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Fix memleak in dev->p
Dmitry Shmidt [Mon, 13 Jun 2011 23:28:59 +0000]
net: wireless: bcmdhd: Fix memleak in dev->p

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Fix scan timeout for abg case
Dmitry Shmidt [Mon, 13 Jun 2011 23:03:21 +0000]
net: wireless: bcmdhd: Fix scan timeout for abg case

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agoHACK: time: Disable alarmtimer
Colin Cross [Tue, 14 Jun 2011 18:36:39 +0000]
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>

7 years agoinput: gpio_input: send input_sync after reporting keys
Jeff Brown [Fri, 18 Mar 2011 23:02:26 +0000]
input: gpio_input: send input_sync after reporting keys

Signed-off-by: jeffbrown@android.com
Change-Id: Ie170960df3c8ab4833ed686135dc8575cb9f2d48

7 years agoinput: gpio_matrix: send input_sync after reporting keys
Jeff Brown [Fri, 18 Mar 2011 21:10:23 +0000]
input: gpio_matrix: send input_sync after reporting keys

Signed-off-by: jeffbrown@android.com
Change-Id: I9bd2437503b48bf37f4d93505ccd2806e4aab977

7 years agonet: wireless: bcmdhd: Prevent using WEXT in case of CFG80211
Dmitry Shmidt [Mon, 13 Jun 2011 22:16:59 +0000]
net: wireless: bcmdhd: Prevent using WEXT in case of CFG80211

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Add missing dhd_get_dtim_skip() declaration
Dmitry Shmidt [Mon, 13 Jun 2011 22:14:15 +0000]
net: wireless: bcmdhd: Add missing dhd_get_dtim_skip() declaration

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Get rid of ANDROID define
Dmitry Shmidt [Mon, 13 Jun 2011 20:37:52 +0000]
net: wireless: bcmdhd: Get rid of ANDROID define

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Add setting country code from platform data
Dmitry Shmidt [Mon, 13 Jun 2011 18:11:43 +0000]
net: wireless: bcmdhd: Add setting country code from platform data

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Fix SOFTAP compilation
Dmitry Shmidt [Mon, 13 Jun 2011 17:15:12 +0000]
net: wireless: bcmdhd: Fix SOFTAP compilation

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Get MAC from platform data
Dmitry Shmidt [Mon, 13 Jun 2011 17:07:57 +0000]
net: wireless: bcmdhd: Get MAC from platform data

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Fix ANDROID define, clean obsolete code
Dmitry Shmidt [Mon, 13 Jun 2011 16:59:51 +0000]
net: wireless: bcmdhd: Fix ANDROID define, clean obsolete code

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agoUpdate to 5.90.125.27 release.
Howard M. Harte [Sat, 11 Jun 2011 00:20:12 +0000]
Update to 5.90.125.27 release.

Change-Id: I593f4a90671468b486e5f39b9eeff8ae65ac9431
Signed-off-by: Howard M. Harte <hharte@broadcom.com>

7 years agoprintk: do not handle non-sleepable notification in console_cpu_notify
mhban [Wed, 8 Jun 2011 09:13:15 +0000]
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>

7 years agonet: wireless: Add CONFIG_WIFI_CONTROL_FUNC option
Dmitry Shmidt [Wed, 8 Jun 2011 22:16:52 +0000]
net: wireless: Add CONFIG_WIFI_CONTROL_FUNC option

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Switch to CUSTOMER_HW2
Dmitry Shmidt [Wed, 8 Jun 2011 22:15:31 +0000]
net: wireless: bcmdhd: Switch to CUSTOMER_HW2

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Remove obsolete debug messages
Dmitry Shmidt [Wed, 8 Jun 2011 22:14:25 +0000]
net: wireless: bcmdhd: Remove obsolete debug messages

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Allow error debug prints from the beginning
Dmitry Shmidt [Wed, 8 Jun 2011 22:13:38 +0000]
net: wireless: bcmdhd: Allow error debug prints from the beginning

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcm4329: Update example locale table
Dmitry ORNATSKYY [Wed, 18 May 2011 20:58:44 +0000]
net: wireless: bcm4329: Update example locale table

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcm4329: Reduce listen interval to 10 (from 20)
Dmitry ORNATSKYY [Wed, 11 May 2011 16:44:21 +0000]
net: wireless: bcm4329: Reduce listen interval to 10 (from 20)

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcm4329: Add new and default wifi locale support
Dmitry Shmidt [Tue, 10 May 2011 23:29:51 +0000]
net: wireless: bcm4329: Add new and default wifi locale support

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Fix watchdog firing in softirq on removal
Dmitry Shmidt [Thu, 2 Jun 2011 23:08:37 +0000]
net: wireless: bcmdhd: Fix watchdog firing in softirq on removal

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Allow WEXT support
Dmitry Shmidt [Wed, 1 Jun 2011 23:22:21 +0000]
net: wireless: bcmdhd: Allow WEXT support

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Fix params in wl_cfg80211_event call
Dmitry Shmidt [Wed, 1 Jun 2011 23:20:54 +0000]
net: wireless: bcmdhd: Fix params in wl_cfg80211_event call

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Add spinlock initialization
Dmitry Shmidt [Wed, 1 Jun 2011 22:22:10 +0000]
net: wireless: bcmdhd: Add spinlock initialization

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Fix config FW and NVRAM path
Dmitry Shmidt [Wed, 1 Jun 2011 22:17:48 +0000]
net: wireless: bcmdhd: Fix config FW and NVRAM path

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agoUpdate to 5.90.125.22:
Howard M. Harte [Fri, 27 May 2011 23:07:36 +0000]
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>

7 years agonet: wireless: bcmdhd: Initial version based on 5.90.125.14
Dmitry Shmidt [Tue, 24 May 2011 18:14:33 +0000]
net: wireless: bcmdhd: Initial version based on 5.90.125.14

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agoARM: etm: Power down etm(s) when tracing is not enabled
Arve Hjønnevåg [Thu, 24 Feb 2011 00:51:58 +0000]
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>

7 years agoARM: etm: Support multiple ETMs/PTMs.
Arve Hjønnevåg [Sat, 5 Feb 2011 06:38:14 +0000]
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>

7 years agoARM: etm: Return the entire trace buffer if it is empty after reset
Arve Hjønnevåg [Sat, 5 Feb 2011 06:38:14 +0000]
ARM: etm: Return the entire trace buffer if it is empty after reset

On some SOCs the read and write pointer are reset when the chip
resets, but the trace buffer content is preserved. If the status
bits indicates that the buffer is empty and we have never started
tracing, assume the buffer is full instead. This can be useful
if the system rebooted from a watchdog reset.

Change-Id: Iaf21c2c329c6059004ee1d38e3dfff66d7d28029
Signed-off-by: Arve Hjønnevåg <arve@android.com>

7 years agoARM: etm: Add some missing locks and error checks
Arve Hjønnevåg [Tue, 15 Feb 2011 05:09:51 +0000]
ARM: etm: Add some missing locks and error checks

It is not safe to call etm_lock or etb_lock without holding the
mutex since another thread may also have unlocked the registers.

Also add some missing checks for valid etb_regs in the etm sysfs
entries.

Change-Id: I939f76a6ea7546a8fc0d4ddafa2fd2b6f38103bb
Signed-off-by: Arve Hjønnevåg <arve@android.com>