Commit Graph

211350 Commits

Author SHA1 Message Date
Greg Goldman
95f265ce59 net: wireless: bcm4329: Fix scan timeout for abg case
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:43 -07:00
Greg Goldman
6785d406dc net: wireless: bcm4329: Force scan when driver is loaded
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:43 -07:00
Dmitry Shmidt
5aba5f0f78 net: wireless: bcm4329: Add wakelock processing to WEXT requests
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:43 -07:00
Greg Goldman
c97fa2daa8 net: wireless: bcm4329: Update to Version 4.218.246 and setband fix
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:42 -07:00
Howard Harte
d3bf457b29 net: wireless: bcm4329: Update to 4.218.245 (combo scan)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:42 -07:00
Mike Lockwood
b4ff5d8efe USB: g_mass_storage: Always allow disabling mass storage by writing to lun file
For android builds we disable the check for curlun->prevent_medium_removal.
Instead we let the framework manage unmounting policy, as we sometimes need
to unmount after the media has been removed.
This also helps support hosts that do not inform the device when the media
has been unmounted.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:42 -07:00
Arve Hjønnevåg
88af8fe00c yaffs: Use init_timer_on_stack for timer on stack
Change-Id: I517b94a1ca22c1690fd6421cf9892a05039a3def
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:42 -07:00
Dima Zavin
b5a327cd78 input: gpio_event: make driver be more robust against incorrectly configured lvl trigger irqs
Change-Id: Ie378600668500dcffeaaddeaba3628e5c2141aa4
Signed-off-by: Dima Zavin <dima@android.com>
2010-09-29 17:49:42 -07:00
Arve Hjønnevåg
77598e8316 Input: gpio_event: Don't call gpio_cansleep before gpio_request.
If the gpio did not exist it would crash in gpiolib.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:41 -07:00
Dmitry Shmidt
325c547f8b net: wireless: bcm4329: Add wakelock processing in ioctl and messaging
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:41 -07:00
Howard Harte
29b41d7cc4 net: wireless: bcm4329: Fix packet filter to only filter out non-unicast frames
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:41 -07:00
Arve Hjønnevåg
a231637f32 ashmem: Fix ASHMEM_SET_PROT_MASK.
Change-Id: I1412cc9560de8c4feb1162fc30922f0e3362a476
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-09-29 17:49:41 -07:00
Mike Chan
9237de98d1 scheduler: cpuacct: Enable platform callbacks for cpuacct power tracking
Platform must register cpu power function that return power in
milliWatt seconds.

Change-Id: I1caa0335e316c352eee3b1ddf326fcd4942bcbe8
Signed-off-by: Mike Chan <mike@android.com>
2010-09-29 17:49:41 -07:00
Mike Chan
8d8e56b794 scheduler: cpuacct: Enable platform hooks to track cpuusage for CPU frequencies
Introduce new platform callback hooks for cpuacct for tracking CPU frequencies

Not all platforms / architectures have a set CPU_FREQ_TABLE defined
for CPU transition speeds. In order to track time spent in at various
CPU frequencies, we enable platform callbacks from cpuacct for this accounting.

Architectures that support overclock boosting, or don't have pre-defined
frequency tables can implement their own bucketing system that makes sense
given their cpufreq scaling abilities.

New file:
cpuacct.cpufreq reports the CPU time (in nanoseconds) spent at each CPU
frequency.

Change-Id: I10a80b3162e6fff3a8a2f74dd6bb37e88b12ba96
Signed-off-by: Mike Chan <mike@android.com>
2010-09-29 17:49:41 -07:00
Mike Lockwood
73b1c8a4ea USB: gadget: f_mtp: Add ioctl for sending events via the interrupt endpoint
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:40 -07:00
Colin Cross
f69c4142c1 misc: add akm8975 compass driver
Originally written by HTC. Contributions by Motorola and AKM.
  misc: Import akm8975 from Motorola

Major style and code cleanups by Praveen Bharathi <pbharathi@motorola.com>
  misc: akm8975: clean up code violations in akm8975.c
  misc: akm8975: Clean up coding style, add suspend and resume

Change-Id: I4196913f15aec2dfbed47506d3dc085aada8e92d
Signed-off-by: Dima Zavin <dima@android.com>
2010-09-29 17:49:40 -07:00
Dmitry Shmidt
d046c853ab drivers: usb: gadget: rndis: Fix section mismatch warning
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:40 -07:00
Dmitry Shmidt
a9459724d5 drivers: usb: gadget: mass_storage: Fix section mismatch warning
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:40 -07:00
Dmitry Shmidt
c51e3dc98e drivers: input: misc: Fix section mismatch warning
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:40 -07:00
Dmitry Shmidt
53847ce6d7 drivers: usb: gadget: Fix section mismatch warning
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:40 -07:00
Dmitry Shmidt
11d4919b98 network: wireless: bcm4329: Add driver SETSUSPEND command
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:39 -07:00
Greg Goldman
0631793701 network: wireless: bcm4329: Fix BUS DOWN in IOCTL
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:39 -07:00
Mike Lockwood
35ee07a4df USB: composite: Add usb_composite_force_reset utility to force enumeration
Use this rather than calling usb_gadget_disconnect and usb_gadget_connect
directly to avoid sending USB disconnect events to userspace when resetting
the bus.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:39 -07:00
Dmitry Shmidt
1ee6838659 network: wireless: bcm4329: Set special OUI: 02:1A:11:FH:HH:HH for SoftAP
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:39 -07:00
Mike Lockwood
d620052f3e USB: gadget: android: Remove unused function android_usb_set_connected()
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:39 -07:00
Mike Lockwood
136826b4f1 USB: gadget: composite: Move switch_set_state calls to a work queue
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:39 -07:00
Mike Lockwood
140277b8f7 USB: gadget: f_mtp: USB gadget function driver for MTP and PTP device support.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:38 -07:00
Mike Lockwood
b3a4a18a4c USB: composite: Add support for functions overriding USB_DT_STRING descriptors
Needed for MTP support.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:38 -07:00
Mike Lockwood
a9946e705c USB: gadget: composite: Add userspace notifications for USB state changes
Add switch to notify current USB configuration.  This can be used to detect
USB connect and disconnect events.

Broadcast a change via the usb_composite class when a USB function is
enabled or disabled.

Rename usb_function.hidden to usb_function.disabled.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:38 -07:00
Mike Lockwood
ff9cdcd465 USB: gadget: f_mass_storage: Integrate android customizations
Integrate support for android composite driver and platform data
within CONFIG_USB_ANDROID_MASS_STORAGE.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:38 -07:00
Bjorn Bringert
7dc0be13b0 Implement read(2) in ashmem driver
Bug: 2595601
Change-Id: I47c0016f594f9354fb8658ccb26e3d395bcb137b
Signed-off-by: Bjorn Bringert <bringert@android.com>
2010-09-29 17:49:38 -07:00
Greg Goldman
8ad3de415d network: wireless: bcm4329: Reduce driver loading time
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:38 -07:00
Arve Hjønnevåg
56ab3d0a00 network: wireless: bcm4329: Add 2.6.35 compatibility and fix memory leak in set_multicast_list
Signed-off-by: Dmitry Shmidt <dimitrysh@android.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:37 -07:00
Dmitry Shmidt
1c57305e18 net: wireless: bcm4329: Add SoftAP MAC address randomization
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:37 -07:00
Mike Chan
12b0cec7ba net: activity_stats: Add statistics for network transmission activity
When enabled, tracks the frequency of network transmissions
(inbound and outbound) and buckets them accordingly.
Buckets are determined by time between network activity.

Each bucket represents the number of network transmisions that were
N sec or longer apart. Where N is defined as 1 << bucket index.

This network pattern tracking is particularly useful for wireless
networks (ie: 3G) where batching network activity closely together
is more power efficient than far apart.

New file: /proc/net/stat/activity

output:

Min Bucket(sec) Count
              1 7
              2 0
              4 1
              8 0
             16 0
             32 2
             64 1
            128 0

Change-Id: I4c4cd8627b872a55f326b1715c51bc3bdd6e8d92
Signed-off-by: Mike Chan <mike@android.com>
2010-09-29 17:49:37 -07:00
Greg Goldman
3ddaed49e7 network: wireless: bcm4329: Update to Version 4.218.239
Add reading mac address from platform data
    Add dhd_os_proto_block protection for dhd_preinit_ioctls
    Revert dhdsdio_clk() changes

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:37 -07:00
Dmitry Shmidt
3e82dd2356 network: wireless: bcm4329: Fix wlan card removal
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:37 -07:00
Greg Goldman
a1eb0b3d9f network: wireless: bcm4329: Fix MAC address import
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:36 -07:00
Greg Goldman
7c82d4484a network: wireless: bcm4329: Update to Version 4.218.238
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:36 -07:00
Dmitry Shmidt
18cde38642 network: wireless: Add get_mac_addr functionality to platform
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:36 -07:00
Dmitry Shmidt
4d1deab06b network: wireless: bcm4329: Remove unnecessary set_freezable() calls
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:36 -07:00
Howard Harte
0946fa3463 network: wireless: bcm4329: Add "HANG" event and console monitoring
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:36 -07:00
Dmitry Shmidt
653767f92b network: wireless: bcm4329: Add bcm4329 driver
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-29 17:49:36 -07:00
San Mehat
84e65f0b90 staging: android: lowmemorykiller: Remove bitrotted codepath
Now that we're murder-synchronous, this code path will never be
called (and if it does, it doesn't tell us anything useful other
than we killed a task that was already being killed by somebody
else but hadn't gotten its' signal yet)

Signed-off-by: San Mehat <san@google.com>
2010-09-29 17:49:35 -07:00
San Mehat
7054bf4b53 staging: android: lowmemorykiller: Fix task_struct leak
As it turns out, the CONFIG_PROFILING interfaces leak a
task struct if the notifier chain returns NOTIFY_OK.. doh.

This patch reworks lowmemkiller to use the new generic task
free notifier chain.

Signed-off-by: San Mehat <san@google.com>
2010-09-29 17:49:34 -07:00
San Mehat
e79ef44016 sched: Add a generic notifier when a task struct is about to be freed
This patch adds a notifier which can be used by subsystems that may
be interested in when a task has completely died and is about to
have it's last resource freed.

  The Android lowmemory killer uses this to determine when a task
it has killed has finally given up its goods.

Signed-off-by: San Mehat <san@google.com>
2010-09-29 17:49:34 -07:00
Christopher Lais
9f69ebbf40 binder: Fix memory corruption via page aliasing
binder_deferred_release was not unmapping the page from the buffer
before freeing it, causing memory corruption.  This only happened
when page(s) had not been freed by binder_update_page_range, which
properly unmaps the pages.

This only happens on architectures with VIPT aliasing.

To reproduce, create a program which opens, mmaps, munmaps, then closes
the binder very quickly.  This should leave a page allocated when the
binder is released.  When binder_deferrred_release is called on the
close, the page will remain mapped to the address in the linear
proc->buffer.  Later, we may map the same physical page to a different
virtual address that has different coloring, and this may cause
aliasing to occur.

PAGE_POISONING will greatly increase your chances of noticing any
problems.

Change-Id: I6941bf212881b8bf846bdfda43d3609c7ae4892e

Signed-off-by: Christopher Lais <chris+android@zenthought.org>
2010-09-29 17:49:34 -07:00
San Mehat
28633d10f9 staging: android: lowmemkiller: Substantially reduce overhead during reclaim
This patch optimizes lowmemkiller to not do any work when it has an outstanding
kill-request. This greatly reduces the pressure on the task_list lock
(improving interactivity), as well as improving the vmscan performance
when under heavy memory pressure (by up to 20x in tests).

Note: For this enhancement to work, you need CONFIG_PROFILING

Signed-off-by: San Mehat <san@google.com>
2010-09-29 17:49:34 -07:00
Dima Zavin
16483f51c7 [ARM] Do not call flush_cache_user_range with mmap_sem held
We can't be holding the mmap_sem while calling flush_cache_user_range
because the flush can fault. If we fault on a user address, the
page fault handler will try to take mmap_sem again. Since both places
acquire the read lock, most of the time it succeeds. However, if another
thread tries to acquire the write lock on the mmap_sem (e.g. mmap) in
between the call to flush_cache_user_range and the fault, the down_read
in do_page_fault will deadlock.

Also, since we really can't be holding the mmap_sem while calling
flush_cache_user_range AND vma is actually unused by the flush itself,
get rid of vma as an argument.

Change-Id: If55409bde41ad1060fa4fe7cbd4ac530d4d9a106
Signed-off-by: Dima Zavin <dima@android.com>
2010-09-29 17:49:33 -07:00
Velempati Chiranjeevi
c600bd3a24 USB: android gadget: mass storage: Fix format issue for Vista Host
As part of formating the mass storage device, Host sends the INQUIRY
scsi command. As per the standard, the command length for this
command should be 6 bytes, whereas the Vista host sends 12 bytes.

When the command length of the command is not equal to the standard
length, the device sends a phase error as part of the status phase.
When the host receives a phase error, it re-enumerates, hence the
error.

If the command is INQUIRY, and the command length is 12 bytes,
treating this as a good command and not sending the phase error
to the host fixes this issue.

Signed-off-by: Velempati Chiranjeevi <c_cvelem@qualcomm.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-29 17:49:33 -07:00