platform/kernel/kernel-mfld-blackbay.git
13 years agousb: gadget: android: follow proper order on disconnect
Dima Zavin [Wed, 14 Sep 2011 18:53:11 +0000 (11:53 -0700)]
usb: gadget: android: follow proper order on disconnect

We should composite_disconnect *before* updating our internal
state and sending uevent to userspace.
Also, hold cdev->lock while updating internal state.

Change-Id: If66a5a4f7d4a102a44aefc3ce4a154a5a1517dcf
Signed-off-by: Dima Zavin <dima@android.com>
13 years agoinput: misc: gpio; make wake irq conditional, and disable on remove paths
Mike J. Chen [Fri, 15 Oct 2010 01:04:03 +0000 (18:04 -0700)]
input: misc: gpio; make wake irq conditional, and disable on remove paths

Add a board file option to gpio_input devices to make
calling enable_irq_wake conditional.  Also disable the
wake irq when removing the device.

Change-Id: If933b9d3a751d89fa95ae3b7f739dfe70fcb23c8
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
13 years agoARM: vfp: Always save VFP state in vfp_pm_suspend
Colin Cross [Tue, 16 Aug 2011 23:36:29 +0000 (16:36 -0700)]
ARM: vfp: Always save VFP state in vfp_pm_suspend

vfp_pm_suspend should save the VFP state in suspend after
any lazy context switch.  If it only saves when the VFP is enabled,
the state can get lost when, on a UP system:
  Thread 1 uses the VFP
  Context switch occurs to thread 2, VFP is disabled but the
     VFP context is not saved
  Thread 2 initiates suspend
  vfp_pm_suspend is called with the VFP disabled, and the unsaved
     VFP context of Thread 1 in the registers

Modify vfp_pm_suspend to save the VFP context whenever
vfp_current_hw_state is not NULL.

Change-Id: I91f29722d256a3afc1cc04df8b227541434ccffb
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Barry Song <bs14@csr.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Colin Cross <ccross@android.com>
13 years agoARM: vfp: ensure that thread flushing works if preempted
Russell King [Sat, 9 Jul 2011 16:41:33 +0000 (17:41 +0100)]
ARM: vfp: ensure that thread flushing works if preempted

Prevent a preemption event causing the initialized VFP state being
overwritten by ensuring that the VFP hardware access is disabled
prior to starting initialization.  We can then do this in safety
while still allowing preemption to occur.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: vfp: fix a hole in VFP thread migration
Russell King [Sat, 9 Jul 2011 15:09:43 +0000 (16:09 +0100)]
ARM: vfp: fix a hole in VFP thread migration

Fix a hole in the VFP thread migration.  Lets define two threads.

Thread 1, we'll call 'interesting_thread' which is a thread which is
running on CPU0, using VFP (so vfp_current_hw_state[0] =
&interesting_thread->vfpstate) and gets migrated off to CPU1, where
it continues execution of VFP instructions.

Thread 2, we'll call 'new_cpu0_thread' which is the thread which takes
over on CPU0.  This has also been using VFP, and last used VFP on CPU0,
but doesn't use it again.

The following code will be executed twice:

cpu = thread->cpu;

/*
 * On SMP, if VFP is enabled, save the old state in
 * case the thread migrates to a different CPU. The
 * restoring is done lazily.
 */
if ((fpexc & FPEXC_EN) && vfp_current_hw_state[cpu]) {
vfp_save_state(vfp_current_hw_state[cpu], fpexc);
vfp_current_hw_state[cpu]->hard.cpu = cpu;
}
/*
 * Thread migration, just force the reloading of the
 * state on the new CPU in case the VFP registers
 * contain stale data.
 */
if (thread->vfpstate.hard.cpu != cpu)
vfp_current_hw_state[cpu] = NULL;

The first execution will be on CPU0 to switch away from 'interesting_thread'.
interesting_thread->cpu will be 0.

So, vfp_current_hw_state[0] points at interesting_thread->vfpstate.
The hardware state will be saved, along with the CPU number (0) that
it was executing on.

'thread' will be 'new_cpu0_thread' with new_cpu0_thread->cpu = 0.
Also, because it was executing on CPU0, new_cpu0_thread->vfpstate.hard.cpu = 0,
and so the thread migration check is not triggered.

This means that vfp_current_hw_state[0] remains pointing at interesting_thread.

The second execution will be on CPU1 to switch _to_ 'interesting_thread'.
So, 'thread' will be 'interesting_thread' and interesting_thread->cpu now
will be 1.  The previous thread executing on CPU1 is not relevant to this
so we shall ignore that.

We get to the thread migration check.  Here, we discover that
interesting_thread->vfpstate.hard.cpu = 0, yet interesting_thread->cpu is
now 1, indicating thread migration.  We set vfp_current_hw_state[1] to
NULL.

So, at this point vfp_current_hw_state[] contains the following:

[0] = &interesting_thread->vfpstate
[1] = NULL

Our interesting thread now executes a VFP instruction, takes a fault
which loads the state into the VFP hardware.  Now, through the assembly
we now have:

[0] = &interesting_thread->vfpstate
[1] = &interesting_thread->vfpstate

CPU1 stops due to ptrace (and so saves its VFP state) using the thread
switch code above), and CPU0 calls vfp_sync_hwstate().

if (vfp_current_hw_state[cpu] == &thread->vfpstate) {
vfp_save_state(&thread->vfpstate, fpexc | FPEXC_EN);

BANG, we corrupt interesting_thread's VFP state by overwriting the
more up-to-date state saved by CPU1 with the old VFP state from CPU0.

Fix this by ensuring that we have sane semantics for the various state
describing variables:

1. vfp_current_hw_state[] points to the current owner of the context
   information stored in each CPUs hardware, or NULL if that state
   information is invalid.
2. thread->vfpstate.hard.cpu always contains the most recent CPU number
   which the state was loaded into or NR_CPUS if no CPU owns the state.

So, for a particular CPU to be a valid owner of the VFP state for a
particular thread t, two things must be true:

 vfp_current_hw_state[cpu] == &t->vfpstate && t->vfpstate.hard.cpu == cpu.

and that is valid from the moment a CPU loads the saved VFP context
into the hardware.  This gives clear and consistent semantics to
interpreting these variables.

This patch also fixes thread copying, ensuring that t->vfpstate.hard.cpu
is invalidated, otherwise CPU0 may believe it was the last owner.  The
hole can happen thus:

- thread1 runs on CPU2 using VFP, migrates to CPU3, exits and thread_info
  freed.
- New thread allocated from a previously running thread on CPU2, reusing
  memory for thread1 and copying vfp.hard.cpu.

At this point, the following are true:

new_thread1->vfpstate.hard.cpu == 2
&new_thread1->vfpstate == vfp_current_hw_state[2]

Lastly, this also addresses thread flushing in a similar way to thread
copying.  Hole is:

- thread runs on CPU0, using VFP, migrates to CPU1 but does not use VFP.
- thread calls execve(), so thread flush happens, leaving
  vfp_current_hw_state[0] intact.  This vfpstate is memset to 0 causing
  thread->vfpstate.hard.cpu = 0.
- thread migrates back to CPU0 before using VFP.

At this point, the following are true:

thread->vfpstate.hard.cpu == 0
&thread->vfpstate == vfp_current_hw_state[0]

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: vfp: rename check_exception to vfp_hw_state_valid
Russell King [Sat, 9 Jul 2011 13:24:36 +0000 (14:24 +0100)]
ARM: vfp: rename check_exception to vfp_hw_state_valid

Rename this branch to more accurately reflect why its taken, rather
than what the following code does.  It is the only caller of this code.
This helps to clarify following changes, yet this change results in no
actual code change.

Document the VFP hardware state at the target of this branch.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: vfp: rename last_VFP_context to vfp_current_hw_state
Russell King [Sat, 9 Jul 2011 12:44:04 +0000 (13:44 +0100)]
ARM: vfp: rename last_VFP_context to vfp_current_hw_state

Rename the slightly confusing 'last_VFP_context' variable to be more
descriptive of what it actually is.  This variable stores a pointer
to the current owner's vfpstate structure for the context held in the
VFP hardware.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agonetfilter: xt_qtaguid: warn only once for missing proc qtaguid data
JP Abgrall [Sun, 11 Sep 2011 19:13:41 +0000 (12:13 -0700)]
netfilter: xt_qtaguid: warn only once for missing proc qtaguid data

When a process doesn't have /dev/xt_qtaguid open, only warn once
instead of for every ctrl access.

Change-Id: I98a462a8731254ddc3bf6d2fefeef9823659b1f0
Signed-off-by: JP Abgrall <jpa@google.com>
13 years agousb: otg_id: add suspend/resume interface
Dima Zavin [Fri, 9 Sep 2011 16:25:05 +0000 (09:25 -0700)]
usb: otg_id: add suspend/resume interface

It is possible that while one driver has already suspended,
another driver calls otg_id_notify() because it has not yet been
suspended. It would then be possible for the suspended driver's
detect callback to be called. This is undesirable.

Introduce new otg_id_suspend/otg_id_resume functions that
keep a suspended count, and if a notification happens while
someone is suspended, that notification is deferred until
all the drivers are resumed. If the notification happens before
the last driver is suspended, that suspend will be aborted
and once the final driver resumes through otg_id_resume, the
notification will be delivered.

Change-Id: I32fd32bec65e366e5f97a25c15255d94773b85b3
Signed-off-by: Dima Zavin <dima@android.com>
13 years agonetfilter: xt_qtaguid: 1st pass at tracking tag based data resources
JP Abgrall [Fri, 9 Sep 2011 08:55:24 +0000 (01:55 -0700)]
netfilter: xt_qtaguid: 1st pass at tracking tag based data resources

* Added global resource tracking based on tags.
 - Can be put into passive mode via
    /sys/modules/xt_qtaguid/params/tag_tracking_passive
 - The number of socket tags per UID is now limited
 - Adding /dev/xt_qtaguid that each process should open before starting
to tag sockets. A later change will make it a "must".
 - A process should not create new tags unless it has the dev open.
  A later change will make it a must.
 - On qtaguid_resources release, the process' matching socket tag info
  is deleted.
* Support run-time debug mask via /sys/modules parameter "debug_mask".
* split module into prettyprinting code, includes, main.
* Removed ptrdiff_t usage which didn't work in all cases.

Change-Id: I4a21d3bea55d23c1c3747253904e2a79f7d555d9
Signed-off-by: JP Abgrall <jpa@google.com>
13 years agonet: wireless: change the expire time about each entry of scan results
jun.ho.lee [Fri, 9 Sep 2011 09:50:02 +0000 (18:50 +0900)]
net: wireless: change the expire time about each entry of scan results

Change-Id: I6e8d838d91bebc28f4cd09dcb8b9f1de775be13d
Signed-off-by: jun.ho.lee <jun.ho.lee@samsung.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agortc alarm: fix bad index when canceling alarms[]
JP Abgrall [Sat, 3 Sep 2011 01:14:12 +0000 (18:14 -0700)]
rtc alarm: fix bad index when canceling alarms[]

It was using ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP_MASK as an
index.

Change-Id: I919860cc71254453e382616bce9fd5455802cb3d
Signed-off-by: JP Abgrall <jpa@google.com>
13 years agommc: core: host: only use wakelock for detect work
Colin Cross [Thu, 8 Sep 2011 00:28:58 +0000 (17:28 -0700)]
mmc: core: host: only use wakelock for detect work

There is no need to take a wakelock for delayed lazy disable
work, it will be cancelled in the suspend handler and force
disabled.  Only take the wakelock when the detect work is
queued, and make sure to drop the wakelock if the work is
cancelled.

Change-Id: I1e507a5f98848954ea21d45e23b6192c3132a349
Signed-off-by: Colin Cross <ccross@android.com>
13 years agoUSB: gadget: android: pass ctrl requests to accessory function when disabled
Mike Lockwood [Wed, 7 Sep 2011 16:55:12 +0000 (09:55 -0700)]
USB: gadget: android: pass ctrl requests to accessory function when disabled

Signed-off-by: Mike Lockwood <lockwood@android.com>
13 years agonet: wireless: bcmdhd: Update to version 5.90.125.78
Dmitry Shmidt [Wed, 7 Sep 2011 17:30:45 +0000 (10:30 -0700)]
net: wireless: bcmdhd: Update to version 5.90.125.78

- Add BT-Coex support to cfg80211
- Add private event logic to cfg80211 when FW hangs
- Reduce passive dwell time to 130 ms
- Fix proptx initialize fail issue
- Implement codes for WPS2.0 using cfg80211
- Clean any left virtual interfaces in primary dhd_stop context
- Skip waiting for rtnl_lock in cfg80211 callback if already taken
- Skip writing to file FW trap info

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agousb: ehci: make HC see up-to-date qh/qtd descriptor ASAP
Ming Lei [Tue, 30 Aug 2011 16:03:13 +0000 (16:03 +0000)]
usb: ehci: make HC see up-to-date qh/qtd descriptor ASAP

This patch introduces the helper of ehci_sync_mem to flush
qtd/qh into memory immediately on some ARM, so that HC can
see the up-to-date qtd/qh descriptor asap.

This patch fixs one performance bug on ARM Cortex A9 dual core
platform, which has been reported on quite a few ARM machines
(OMAP4, Tegra 2, snowball...), see details from link of
https://bugs.launchpad.net/bugs/709245.

The patch has been tested ok on OMAP4 panda A1 board, and the
performance of 'dd' over usb mass storage can be increased from
4~5MB/sec to 14~16MB/sec after applying this patch.

Change-Id: I7994c58a1001c7f46f13e09420328a3916bbfcef
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
13 years agoPM: Backoff suspend if repeated attempts fail
Todd Poynor [Fri, 26 Aug 2011 02:29:45 +0000 (19:29 -0700)]
PM: Backoff suspend if repeated attempts fail

Change-Id: I32289676d95a307ea3aa5e78f6c126ca979c0fec
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agonetfilter: qtaguid: fix proc/.../stats uid filtered output
JP Abgrall [Wed, 31 Aug 2011 20:50:15 +0000 (13:50 -0700)]
netfilter: qtaguid: fix proc/.../stats uid filtered output

"cat /proc/net/xt_qtaguid/stats"
for a non-priviledged UID would output multiple twice its own stats.
The fix tweaks the way lines are counted.

Non-root:
  idx iface acct_tag_hex uid_tag_int cnt_set ...
  2 wlan0 0x0 10022 0 ...
  3 wlan0 0x0 10022 1 ...
  4 wlan0 0x3010000000000000 10022 0 ...
  5 wlan0 0x3010000000000000 10022 1 ...

Root:
  idx iface acct_tag_hex uid_tag_int cnt_set
  2 wlan0 0x0 0 0 ...
  3 wlan0 0x0 0 1 ...
  4 wlan0 0x0 1000 0 ...
  ...
  12 wlan0 0x0 10022 0 ...
  13 wlan0 0x0 10022 1 ...
  ...
  18 wlan0 0x3010000000000000 10022 0 ...
  19 wlan0 0x3010000000000000 10022 1 ...

Change-Id: I3cae1f4fee616bc897831350374656b0c718c45b
Signed-off-by: JP Abgrall <jpa@google.com>
13 years agonet: wireless: bcmdhd: Turn Off packet filtering for dhcp session
Dmitry Shmidt [Tue, 30 Aug 2011 23:31:45 +0000 (16:31 -0700)]
net: wireless: bcmdhd: Turn Off packet filtering for dhcp session

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Set bigger wakelock timeout for events
Dmitry Shmidt [Tue, 30 Aug 2011 23:29:10 +0000 (16:29 -0700)]
net: wireless: bcmdhd: Set bigger wakelock timeout for events

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Update to 5.90.125.74
Howard M. Harte [Tue, 30 Aug 2011 02:01:55 +0000 (19:01 -0700)]
net: wireless: bcmdhd: Update to 5.90.125.74

Change-Id: I427ee7a07e794b228e58fa2edbaa127481b67398
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Skip disassoc if country is not changed in country set
Dmitry Shmidt [Fri, 26 Aug 2011 00:13:01 +0000 (17:13 -0700)]
net: wireless: bcmdhd: Skip disassoc if country is not changed in country set

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Use allocation with GFP_ATOMIC only in atomic context
Dmitry Shmidt [Tue, 23 Aug 2011 22:27:40 +0000 (15:27 -0700)]
net: wireless: bcmdhd: Use allocation with GFP_ATOMIC only in atomic context

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoBluetooth: Fix l2cap conn failures for ssp devices
Peter Hurley [Tue, 9 Aug 2011 20:26:55 +0000 (16:26 -0400)]
Bluetooth: Fix l2cap conn failures for ssp devices

Commit 330605423c fixed l2cap conn establishment for non-ssp remote
devices by not setting HCI_CONN_ENCRYPT_PEND every time conn security
is tested (which was always returning failure on any subsequent
security checks).

However, this broke l2cap conn establishment for ssp remote devices
when an ACL link was already established at SDP-level security. This
fix ensures that encryption must be pending whenever authentication
is also pending.

Change-Id: I6876ea5134e90d1f3d0f84e8ed40b92977b3df64
Signed-off-by: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx>
13 years agonetfilter: xt_qtaguid: fix dev_stats for missing NETDEV_UNREGISTER
JP Abgrall [Fri, 26 Aug 2011 00:10:52 +0000 (17:10 -0700)]
netfilter: xt_qtaguid: fix dev_stats for missing NETDEV_UNREGISTER

Turns out that some devices don't call the notifier chains
with NETDEV_UNREGISTER.
So now we only track up/down as the points for tracking
active/inactive transitions and saving the get_dev_stats().

Change-Id: I948755962b4c64150b4d04f294fb4889f151e42b
Signed-off-by: JP Abgrall <jpa@google.com>
13 years agofuse: Freeze client on suspend when request sent to userspace
Todd Poynor [Wed, 24 Aug 2011 22:01:30 +0000 (15:01 -0700)]
fuse: Freeze client on suspend when request sent to userspace

Suspend attempts can abort when the FUSE daemon is already frozen
and a client is waiting uninterruptibly for a response, causing
freezing of tasks to fail.

Use the freeze-friendly wait API, but disregard other signals.

Change-Id: Icefb7e4bbc718ccb76bf3c04daaa5eeea7e0e63c
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agoARM: add option to flush console before reboot
Dima Zavin [Tue, 23 Aug 2011 22:56:50 +0000 (15:56 -0700)]
ARM: add option to flush console before reboot

If the console_lock was held while the system was rebooted, the messages
in the temporary logbuffer would not have propogated to all the console
drivers.

This force releases the console lock if it failed to be acquired.

Change-Id: I193dcf7b968be17966833e50b8b8bc70d5d9fe89
Signed-off-by: Dima Zavin <dima@android.com>
13 years agonet: wireless: bcmdhd: Update to 5.90.125.69
Greg Goldman [Tue, 23 Aug 2011 17:28:41 +0000 (10:28 -0700)]
net: wireless: bcmdhd: Update to 5.90.125.69

Change-Id: I25a516ca4d8f5edc72a2a54e420f5e1b4fe3aa16
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonetfilter: xt_qtaguid: add some tagging/matching stats
JP Abgrall [Sat, 20 Aug 2011 03:21:06 +0000 (20:21 -0700)]
netfilter: xt_qtaguid: add some tagging/matching stats

/proc/net/xt_qtaguid/ctrl will now show:
  active tagged sockets: lines of "sock=%p tag=0x%llx (uid=%u)"
  sockets_tagged, : the number of sockets successfully tagged.
  sockets_untagged: the number of sockets successfully untagged.
  counter_set_changes: ctrl counter set change requests.
  delete_cmds: ctrl delete commands completed.
  iface_events: number of NETDEV_* events handled.
  match_found_sk: sk found in skbuff without ct assist.
  match_found_sk_in_ct: the number of times the connection tracker found
    a socket for us. This happens when the skbuff didn't have info.
  match_found_sk_none: the number of times no sk could be determined
    successfully looked up. This indicates we don't know who the
    data actually belongs to. This could be unsolicited traffic.

Change-Id: I3a65613bb24852e1eea768ab0320a6a7073ab9be
Signed-off-by: JP Abgrall <jpa@google.com>
13 years agonetfilter: xt_qtaguid: Fix sockfd_put() call within spinlock
JP Abgrall [Thu, 18 Aug 2011 22:05:47 +0000 (15:05 -0700)]
netfilter: xt_qtaguid: Fix sockfd_put() call within spinlock

sockfd_put() risks sleeping.
So when doing a delete ctrl command, defer the sockfd_put() and
kfree() to outside of the spinlock.

Change-Id: I5f8ab51d05888d885b2fbb035f61efa5b7abb88a
Signed-off-by: JP Abgrall <jpa@google.com>
13 years agopanic: Add board ID to panic output
Nishanth Menon [Wed, 17 Aug 2011 23:31:58 +0000 (18:31 -0500)]
panic: Add board ID to panic output

At times, it is necessary for boards to provide some additional information
as part of panic logs. Provide information on the board hardware as part
of panic logs.

It is safer to print this information at the very end in case something
bad happens as part of the information retrieval itself.

To use this, set global mach_panic_string to an appropriate string in the
board file.

Change-Id: Id12cdda87b0cd2940dd01d52db97e6162f671b4d
Signed-off-by: Nishanth Menon <nm@ti.com>
13 years agonet: wireless: bcmdhd: Fix Softap initialization
ECCO PARK [Thu, 18 Aug 2011 22:18:04 +0000 (15:18 -0700)]
net: wireless: bcmdhd: Fix Softap initialization

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonetfilter: xt_qtaguid: Fix socket refcounts when tagging
JP Abgrall [Wed, 17 Aug 2011 23:43:00 +0000 (16:43 -0700)]
netfilter: xt_qtaguid: Fix socket refcounts when tagging

* Don't hold the sockets after tagging.
  sockfd_lookup() does a get() on the associated file.
  There was no matching put() so a closed socket could never be
  freed.
* Don't rely on struct member order for tag_node
  The structs that had a struct tag_node member would work with
  the *_tree_* routines only because tag_node was 1st.
* Improve debug messages
  Provide info on who the caller is. Use unsigned int for uid.
* Only process NETDEV_UP events.
* Pacifier: disable netfilter matching. Leave .../stats header.

Change-Id: Iccb8ae3cca9608210c417597287a2391010dff2c
Signed-off-by: JP Abgrall <jpa@google.com>
13 years agonet: wireless: bcmdhd: Update to version 5.90.125.65
Greg Goldman [Tue, 16 Aug 2011 17:04:19 +0000 (10:04 -0700)]
net: wireless: bcmdhd: Update to version 5.90.125.65

Fixing problem with connection A-band
Improving sync between Driver and CFG80211 status

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Update to 5.90.125.64:
Howard M. Harte [Mon, 15 Aug 2011 16:06:07 +0000 (09:06 -0700)]
net: wireless: bcmdhd: Update to 5.90.125.64:
   * Fix for dhd_bus_devreset in dhd_sdio return error 35 when first called.
   * Add combo scan support.
   * Fix PMK caching issue.

Change-Id: Iac9e8591d27ef7240418c79caf0a4ac919ef23f3
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Fixing missing WLP2P defintion for p2p
Greg Goldman [Thu, 11 Aug 2011 00:48:00 +0000 (17:48 -0700)]
net: wireless: bcmdhd: Fixing missing WLP2P defintion for p2p

Change-Id: I9683fe499fd6cae89468dbb048c9fd8f1b13ecce
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agohid-multitouch: Filter collections by application usage.
Jeff Brown [Sun, 24 Jul 2011 21:31:14 +0000 (14:31 -0700)]
hid-multitouch: Filter collections by application usage.

This change fixes two problems.

First, it ensures that the hid-multitouch driver does not incorrectly
map GenericDesktop usages that are intended for other applications,
such as a Mouse.

Second, it sets the appropriate input properties so that user-space
can distinguish TouchScreen devices (INPUT_PROP_DIRECT) from
TouchPad devices (INPUT_PROP_POINTER) and configure them accordingly.

Change-Id: I8c2d947929186ffe7cf04b37c76e29b9abecf8cb
Signed-off-by: jeffbrown@android.com
13 years agohid-debug: Show application usage for each collection.
Jeff Brown [Sun, 24 Jul 2011 21:03:30 +0000 (14:03 -0700)]
hid-debug: Show application usage for each collection.

Change-Id: If8d3ef8647209143b5f0c171c385d37faf82de64
Signed-off-by: jeffbrown@android.com
13 years agousb: gadget: android: Only call ctrlrequest callback on enabled functions
Mike Lockwood [Tue, 2 Aug 2011 15:13:48 +0000 (11:13 -0400)]
usb: gadget: android: Only call ctrlrequest callback on enabled functions

Signed-off-by: Mike Lockwood <lockwood@android.com>
13 years agoUSB: gadget: android: Use "rndis%d" for RNDIS device name instead of "usb%d"
Mike Lockwood [Fri, 12 Aug 2011 21:35:42 +0000 (14:35 -0700)]
USB: gadget: android: Use "rndis%d" for RNDIS device name instead of "usb%d"

Signed-off-by: Mike Lockwood <lockwood@android.com>
13 years agoandroid: logger: bump up the logger buffer sizes
JP Abgrall [Fri, 12 Aug 2011 04:33:35 +0000 (21:33 -0700)]
android: logger: bump up the logger buffer sizes

(port from common android-2.6.39
  commit: 11430f16545205c614dd5bd58e4a7ee630fc0f9f)

events: (no change, 256)
main: 64 -> 256
radio: 64 -> 256
system: 64 -> 256

Change-Id: I42c0d4cc9fa89735d2f05010236070e1e4737ffc
Signed-off-by: JP Abgrall <jpa@google.com>
13 years agoBluetooth: hidp: Don't release device ref if never held
Peter Hurley [Fri, 5 Aug 2011 14:52:01 +0000 (10:52 -0400)]
Bluetooth: hidp: Don't release device ref if never held

When an hidp connection is added for a boot protocol input
device, don't release a device reference that was never
acquired. The device reference is acquired when the session
is linked to the session list (which hasn't happened yet when
hidp_setup_input is called).

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: hidp: Only free input device if failed register
Peter Hurley [Fri, 5 Aug 2011 14:51:50 +0000 (10:51 -0400)]
Bluetooth: hidp: Only free input device if failed register

When an hidp connection is added for a boot protocol input
device, only free the allocated device if device registration fails.
Subsequent failures should only unregister the device (the input
device api documents that unregister will also free the allocated
device).

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: hidp: Fix memory leak of cached report descriptor
Peter Hurley [Fri, 5 Aug 2011 14:51:34 +0000 (10:51 -0400)]
Bluetooth: hidp: Fix memory leak of cached report descriptor

Free the cached HID report descriptor on thread terminate.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: hidp: Fix session cleanup on failed conn add
Peter Hurley [Fri, 5 Aug 2011 14:51:26 +0000 (10:51 -0400)]
Bluetooth: hidp: Fix session cleanup on failed conn add

Once the session thread is running, cleanup must be
handled by the session thread only.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: bnep: Fix deadlock in session deletion
Peter Hurley [Fri, 5 Aug 2011 14:41:35 +0000 (10:41 -0400)]
Bluetooth: bnep: Fix deadlock in session deletion

Commit f4d7cd4a4c introduced the usage of kthread API.
kthread_stop is a blocking function which returns only when
the thread exits. In this case, the thread can't exit because it's
waiting for the write lock, which is being held by bnep_del_connection()
which is waiting for the thread to exit -- deadlock.

Use atomic_t/wake_up_process instead to signal to the thread to exit.

Signed-off-by: Jaikumar Ganesh <jaikumar@google.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Don't use cmd_timer to timeout HCI reset command
Szymon Janc [Tue, 26 Jul 2011 20:46:54 +0000 (22:46 +0200)]
Bluetooth: Don't use cmd_timer to timeout HCI reset command

No command should be send before Command Complete event for HCI
reset is received. This fix regression introduced by commit
6bd32326cda(Bluetooth: Use proper timer for hci command timout)
for chips whose reset command takes longer to complete (e.g. CSR)
resulting in next command being send before HCI reset completed.

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoPM: wakelocks: Display wakelocks preventing suspend by default
Todd Poynor [Mon, 8 Aug 2011 23:06:54 +0000 (16:06 -0700)]
PM: wakelocks: Display wakelocks preventing suspend by default

Use DEBUG_WAKEUP flag to show wakelocks that abort suspend, in
addition to showing wakelocks held during system resume.
DEBUG_WAKEUP is enabled by default.

Change-Id: If6fa68e8afbc482a5300ffab2964694b02b34f41
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agousb: otg: add proxy_wait handler to otg_id
Erik Gilling [Tue, 9 Aug 2011 21:18:21 +0000 (14:18 -0700)]
usb: otg: add proxy_wait handler to otg_id

Some otg_id handlers can detect what's connected but can't detect a change.
This allows that handler to pass off the waiting for ID change to a proxy.

Change-Id: Ib38b750c3da4bffc35e37b620ecee37c5d64d31f
Signed-off-by: Erik Gilling <konkers@android.com>
13 years agonetfilter: xt_qtaguid: recognize IPV6 interfaces. root is procfs privileged.
JP Abgrall [Tue, 9 Aug 2011 18:53:11 +0000 (11:53 -0700)]
netfilter: xt_qtaguid: recognize IPV6 interfaces. root is procfs privileged.

* Allow tracking interfaces that only have an ipv6 address.
  Deal with ipv6 notifier chains that do NETDEV_UP without the rtnl_lock()
* Allow root all access to procfs ctrl/stats.
  To disable all checks:
    echo 0 > /sys/module/xt_qtaguid/parameters/ctrl_write_gid
    echo 0 > /sys/module/xt_qtaguid/parameters/stats_readall_gid
* Add CDEBUG define to enable pr_debug output specific to
    procfs ctrl/stats access.

Change-Id: I9a469511d92fe42734daff6ea2326701312a161b
Signed-off-by: JP Abgrall <jpa@google.com>
13 years agonetfilter: xt_qtaguid: add counter sets and matching control
JP Abgrall [Tue, 9 Aug 2011 18:49:50 +0000 (11:49 -0700)]
netfilter: xt_qtaguid: add counter sets and matching control

* Added support for sets of counters.
By default set 0 is active.
Userspace can control which set is active for a given UID by
writing to .../ctrl
   s <set_num> <uid>
Changing the active set is only permitted for processes in the
 AID_NET_BW_ACCT group.

The active set tracking is reset when the uid tag is deleted with
the .../ctrl command
  d 0 <uid>

* New output format for the proc .../stats
 - Now has cnt_set in the list.
  """
  idx iface acct_tag_hex uid_tag_int cnt_set rx_bytes rx_packets tx_bytes tx_packets rx_tcp_packets rx_tcp_bytes rx_udp_packets rx_udp_bytes rx_other_packets rx_other_bytes tx_tcp_packets tx_tcp_bytes tx_udp_packets tx_udp_bytes tx_other_packets tx_other_bytes
  ...
  2 rmnet0 0x0 1000 0 27729 29 1477 27 27501 26 228 3 0 0 1249 24 228 3 0 0
  2 rmnet0 0x0 1000 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  3 rmnet0 0x0 10005 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  3 rmnet0 0x0 10005 1 46407 57 8008 64 46407 57 0 0 0 0 8008 64 0 0 0 0
  ...
  6 rmnet0 0x7fff000100000000 10005 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  6 rmnet0 0x7fff000100000000 10005 1 27493 24 1564 22 27493 24 0 0 0 0 1564 22 0 0 0 0
  """

* Refactored for proc stats output code.
* Silenced some of the per packet debug output.
* Reworded some of the debug messages.
* Replaced all the spin_lock_irqsave/irqrestore with *_bh():
   netfilter handling is done in softirq.

Change-Id: Ibe89f9d754579fd97335617186c614b43333cfd3
Signed-off-by: JP Abgrall <jpa@google.com>
13 years agonet: wireless: bcmdhd: Fixing memory leak problem in wl_get_ies
Greg Goldman [Tue, 9 Aug 2011 18:43:28 +0000 (11:43 -0700)]
net: wireless: bcmdhd: Fixing memory leak problem in wl_get_ies

Change-Id: I26462c22ba4c3aebc1e157fbf74833c65815647c
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoion: minor clean up
Iliyan Malchev [Tue, 9 Aug 2011 21:42:08 +0000 (14:42 -0700)]
ion: minor clean up

-- init rb nodes in ion_handle_create
-- in ion_handle_destroy, check that a node belongs to a tree before removing
   it (safety check, does not happen right now)
-- mark as static functions used only inside ion.c
-- update comments to ion_share() with a relevant blurb from the implementation
-- other minor updates/typo fixes to comments

Signed-off-by: Iliyan Malchev <malchev@google.com>
13 years agoBluetooth: Fixed wrong L2CAP Sock timer value
Chen Ganir [Thu, 28 Jul 2011 12:42:09 +0000 (15:42 +0300)]
Bluetooth: Fixed wrong L2CAP Sock timer value

L2CAP connection timeout needs to be assigned as miliseconds
and not as jiffies.

Signed-off-by: Chen Ganir <chen.ganir@ti.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoPM: wakelocks: Don't report wake up wakelock if suspend aborted
Todd Poynor [Tue, 9 Aug 2011 00:26:49 +0000 (17:26 -0700)]
PM: wakelocks: Don't report wake up wakelock if suspend aborted

If the wakelock driver aborts suspend due to an already-held
wakelock, don't report the next wakelock held as the "wake up
wakelock".

Change-Id: I582ffbb87a3c361739a77d839a0c62921cff11a6
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agonet: wireless: bcmdhd: Fix CFG80211 memory corruption
Lin Ma [Fri, 5 Aug 2011 19:53:04 +0000 (12:53 -0700)]
net: wireless: bcmdhd: Fix CFG80211 memory corruption

 * Sends event/data packets to kernel while net_device interface
   has not been created or registered yet
 * Timer gets freed twice
 * The primary net_device interface never gets freed
 * Memory corruption in scan buffer
 * Memory corruption in cfg80211 wiphy structure fix for kthred_stop crash

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoipv6: updates to privacy addresses per RFC 4941
JP Abgrall [Wed, 3 Aug 2011 01:53:48 +0000 (18:53 -0700)]
ipv6: updates to privacy addresses per RFC 4941

Update the code to handle some of the differences between
RFC 3041 and RFC 4941, which obsoletes it. Also a couple
of janitorial fixes.

- Allow router advertisements to increase the lifetime of
  temporary addresses. This was not allowed by RFC 3041,
  but is specified by RFC 4941. It is useful when RA
  lifetimes are lower than TEMP_{VALID,PREFERRED}_LIFETIME:
  in this case, the previous code would delete or deprecate
  addresses prematurely.

- Change the default of MAX_RETRY to 3 per RFC 4941.

- Add a comment to clarify that the preferred and valid
  lifetimes in inet6_ifaddr are relative to the timestamp.

- Shorten lines to 80 characters in a couple of places.

Change-Id: I4da097664d4b1de7c1cebf410895319601c7f1cc
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: JP Abgrall <jpa@google.com>
13 years agonet: wireless: bcmdhd: Ensure struct semaphore to be defined
Chih-Wei Huang [Thu, 4 Aug 2011 17:09:43 +0000 (10:09 -0700)]
net: wireless: bcmdhd: Ensure struct semaphore to be defined

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Keep debug symbols for built-in driver
Dmitry Shmidt [Thu, 4 Aug 2011 17:07:19 +0000 (10:07 -0700)]
net: wireless: bcmdhd: Keep debug symbols for built-in driver

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Clean up formatting.
Howard M. Harte [Thu, 4 Aug 2011 00:47:51 +0000 (17:47 -0700)]
net: wireless: bcmdhd: Clean up formatting.

Change-Id: Idf0771201837ad00304107af3592c35a6236eb33
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Improve arp_hostip_table processing
Dmitry Shmidt [Wed, 3 Aug 2011 21:11:58 +0000 (14:11 -0700)]
net: wireless: bcmdhd: Improve arp_hostip_table processing

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Eliminate nested IOCTL call
Lin Ma [Wed, 3 Aug 2011 20:43:03 +0000 (13:43 -0700)]
net: wireless: bcmdhd: Eliminate nested IOCTL call

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Remove noisy debug prints
Dmitry Shmidt [Tue, 2 Aug 2011 18:02:04 +0000 (11:02 -0700)]
net: wireless: bcmdhd: Remove noisy debug prints

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcm4329: Remove obsolete file
Dmitry Shmidt [Tue, 2 Aug 2011 17:27:24 +0000 (10:27 -0700)]
net: wireless: bcm4329: Remove obsolete file

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: add support for mkeepalive.
Howard M. Harte [Tue, 2 Aug 2011 02:38:54 +0000 (19:38 -0700)]
net: wireless: bcmdhd: add support for mkeepalive.
Fix p2p group add issue.
Change-Id: Ieb8fba54e04912b4002837243c00ba90fd150e5d
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Check wldev_ioctl() for NULL parameter
Dmitry Shmidt [Mon, 1 Aug 2011 22:40:01 +0000 (15:40 -0700)]
net: wireless: bcmdhd: Check wldev_ioctl() for NULL parameter

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoBluetooth: l2cap: Fix lost wakeup waiting for ERTM acks
Peter Hurley [Mon, 25 Jul 2011 22:36:26 +0000 (18:36 -0400)]
Bluetooth: l2cap: Fix lost wakeup waiting for ERTM acks

Fix race condition which can result in missing wakeup during
l2cap socket shutdown.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: bnep: Fix lost wakeup of session thread
Peter Hurley [Sun, 24 Jul 2011 04:11:07 +0000 (00:11 -0400)]
Bluetooth: bnep: Fix lost wakeup of session thread

Fix race condition which can result in missing the wakeup intended
to stop the session thread.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: sco: Fix lost wakeups waiting to accept socket
Peter Hurley [Sun, 24 Jul 2011 04:11:01 +0000 (00:11 -0400)]
Bluetooth: sco: Fix lost wakeups waiting to accept socket

Fix race conditions which can cause lost wakeups (or missed signals)
while waiting to accept a sco socket connection.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: l2cap: Fix lost wakeups waiting to accept socket
Peter Hurley [Sun, 24 Jul 2011 04:10:52 +0000 (00:10 -0400)]
Bluetooth: l2cap: Fix lost wakeups waiting to accept socket

Fix race conditions which can cause lost wakeups (or misssed signals)
while waiting to accept an l2cap socket connection.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix lost wakeups waiting for sock state change
Peter Hurley [Sun, 24 Jul 2011 04:10:46 +0000 (00:10 -0400)]
Bluetooth: Fix lost wakeups waiting for sock state change

Fix race conditions which can cause lost wakeups while waiting
for sock state to change.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: rfcomm: Fix lost wakeups waiting to accept socket
Peter Hurley [Sun, 24 Jul 2011 04:10:41 +0000 (00:10 -0400)]
Bluetooth: rfcomm: Fix lost wakeups waiting to accept socket

Fix race conditions which can cause lost wakeups (or missed
signals) while waiting to accept an rfcomm socket connection.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: rfcomm: Remove unnecessary krfcommd event
Peter Hurley [Sun, 24 Jul 2011 04:10:35 +0000 (00:10 -0400)]
Bluetooth: rfcomm: Remove unnecessary krfcommd event

Removed superfluous event handling which was used to signal
that the rfcomm kthread had been woken. This appears to have been
used to prevent lost wakeups. Correctly ordering when the task
state is set to TASK_INTERRUPTIBLE is sufficient to prevent lost wakeups.

To prevent wakeups which occurred prior to initially setting
TASK_INTERRUPTIBLE from being lost, the main work of the thread loop -
rfcomm_process_sessions() - is performed prior to sleeping.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agonet: wireless: bcmdhd: Fix memory corruption in wl_android_get_rssi()
Dmitry Shmidt [Fri, 29 Jul 2011 20:45:06 +0000 (13:45 -0700)]
net: wireless: bcmdhd: Fix memory corruption in wl_android_get_rssi()

In case of FW problem wldev_get_ssid() doesn't return error and ssid
structure has garbage.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: change logic for removing monitor interace for P2P.
Howard M. Harte [Wed, 27 Jul 2011 19:16:11 +0000 (12:16 -0700)]
net: wireless: bcmdhd: change logic for removing monitor interace for P2P.

Change-Id: Ie757ec25c86d0402d0463a9b7f2fff14b840f446
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoAdditional patch for scan and connection problem.
Howard M. Harte [Wed, 27 Jul 2011 01:27:14 +0000 (18:27 -0700)]
Additional patch for scan and connection problem.

Change-Id: I79a25bd3f36f5d3accae83116084b8baf63a1033
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Put p2p_dev_addr under DHD_P2P_DEV_ADDR_FROM_SYSFS
Dmitry Shmidt [Tue, 26 Jul 2011 22:05:47 +0000 (15:05 -0700)]
net: wireless: bcmdhd: Put p2p_dev_addr under DHD_P2P_DEV_ADDR_FROM_SYSFS

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Fix rfkill cleaning on failure
Dmitry Shmidt [Tue, 26 Jul 2011 22:00:34 +0000 (15:00 -0700)]
net: wireless: bcmdhd: Fix rfkill cleaning on failure

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoFix scan and connection problem.
Howard M. Harte [Tue, 26 Jul 2011 02:46:20 +0000 (19:46 -0700)]
Fix scan and connection problem.

Change-Id: Idd77caf358fc77c4b81929c644020d09009e4f36
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoUpdate to 5.90.125.52:
Howard M. Harte [Tue, 26 Jul 2011 02:15:11 +0000 (19:15 -0700)]
Update to 5.90.125.52:
Fix unremoved monitor interface problem after killing hostapd.
Add WPS support for hostapd.

Change-Id: I4e476fafb203592fcdf5c15a526b67d4aa78df3e
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoFix a potential crash/memory leak if NVRAM fails to load.
Howard M. Harte [Tue, 26 Jul 2011 00:19:49 +0000 (17:19 -0700)]
Fix a potential crash/memory leak if NVRAM fails to load.

Change-Id: I27f41dd5833835b74f38524e9691d68ac807c991
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Ignore WL_BSS_INFO_VERSION value
Dmitry Shmidt [Mon, 25 Jul 2011 16:53:20 +0000 (09:53 -0700)]
net: wireless: bcmdhd: Ignore WL_BSS_INFO_VERSION value

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoFix ag band issue and escan crashes
Lin Ma [Fri, 22 Jul 2011 22:51:01 +0000 (15:51 -0700)]
Fix ag band issue and escan crashes

Change-Id: Ie1bdb52a362755b7c922be9b721e9cf0e4042d95
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoPM: Fix printing IRQ names for pending wakeup IRQs
Todd Poynor [Mon, 25 Jul 2011 21:54:03 +0000 (14:54 -0700)]
PM: Fix printing IRQ names for pending wakeup IRQs

The IRQ name has moved to the struct irqaction list (so print
first action's name).

Change-Id: I65a627457f9abaf7c1dcc32d8814243ba2ff4717
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agonetfilter: qtaguid: disable #define DEBUG
JP Abgrall [Fri, 22 Jul 2011 17:34:22 +0000 (10:34 -0700)]
netfilter: qtaguid: disable #define DEBUG

This would cause log spam to the point of slowing down the system.

Change-Id: I5655f0207935004b0198f43ad0d3c9ea25466e4e
Signed-off-by: JP Abgrall <jpa@google.com>
13 years agonetfilter: xt_qtaguid: add uid permission checks during ctrl/stats access
JP Abgrall [Sun, 17 Jul 2011 23:07:23 +0000 (16:07 -0700)]
netfilter: xt_qtaguid: add uid permission checks during ctrl/stats access

* uid handling
 - Limit UID impersonation to processes with a gid in AID_NET_BW_ACCT.
   This affects socket tagging, and data removal.
 - Limit stats lookup to own uid or the process gid is in AID_NET_BW_STATS.
   This affects stats lookup.

* allow pacifying the module
  Setting passive to Y/y will make the module return immediately on
  external stimulus.
  No more stats and silent success on ctrl writes.
  Mainly used when one suspects this module of misbehaving.

Change-Id: I83990862d52a9b0922aca103a0f61375cddeb7c4
Signed-off-by: JP Abgrall <jpa@google.com>
13 years agonetfilter: qtaguid: add tag delete command, expand stats output.
JP Abgrall [Sat, 16 Jul 2011 05:27:28 +0000 (22:27 -0700)]
netfilter: qtaguid: add tag delete command, expand stats output.

* Add a new ctrl command to delete stored data.
  d <acct_tag> [<uid>]
The uid will default to the running process's.
The accounting tag can be 0, in which case all counters and socket tags
associated with the uid will be cleared.

* Simplify the ctrl command handling at the expense of duplicate code.
This should make it easier to maintain.

* /proc/net/xt_qtaguid/stats now returns more stats
  idx iface acct_tag_hex uid_tag_int
  {rx,tx}_{bytes,packets}
  {rx,tx}_{tcp,udp,other}_{bytes,packets}
the {rx,tx}_{bytes,packets} are the totals.

* re-tagging will now allow changing the uid.

Change-Id: I9594621543cefeab557caa3d68a22a3eb320466d
Signed-off-by: JP Abgrall <jpa@google.com>
13 years agonetfilter: quota2: add support to log quota limit reached.
JP Abgrall [Wed, 13 Jul 2011 23:02:31 +0000 (16:02 -0700)]
netfilter: quota2: add support to log quota limit reached.

This uses the NETLINK NETLINK_NFLOG family to log a single message
when the quota limit is reached.
It uses the same packet type as ipt_ULOG, but
 - never copies skb data,
 - uses 112 as the event number (ULOG's +1)

It doesn't log if the module param "event_num" is 0.

Change-Id: I6f31736b568bb31a4ff0b9ac2ee58380e6b675ca
Signed-off-by: JP Abgrall <jpa@google.com>
13 years agonet: wireless: bcmdhd: Fix compilation for WEXT
Dmitry Shmidt [Wed, 20 Jul 2011 23:04:45 +0000 (16:04 -0700)]
net: wireless: bcmdhd: Fix compilation for WEXT

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Allow firmware_path parameter change
Dmitry Shmidt [Wed, 20 Jul 2011 17:31:30 +0000 (10:31 -0700)]
net: wireless: bcmdhd: Allow firmware_path parameter change

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoRelease 5.90.125.48 Add regulatory domain check in cfg80211 driver and fix PNO issues
Lin Ma [Wed, 20 Jul 2011 01:20:12 +0000 (18:20 -0700)]
Release 5.90.125.48 Add regulatory domain check in cfg80211 driver and fix PNO issues

Change-Id: I394f4eb017ca61861f16632e8998a8fb07e6fca7
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Allow empty scan results
Dmitry Shmidt [Tue, 19 Jul 2011 17:00:31 +0000 (10:00 -0700)]
net: wireless: bcmdhd: Allow empty scan results

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Fix compilation for kernel 3.0
Dmitry Shmidt [Tue, 19 Jul 2011 16:58:13 +0000 (09:58 -0700)]
net: wireless: bcmdhd: Fix compilation for kernel 3.0

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoUpdate to 5.90.125.40
Lin Ma [Mon, 18 Jul 2011 18:42:36 +0000 (11:42 -0700)]
Update to 5.90.125.40

Add monitor interface support and fix cfg80211 management frame isses
Add support for hostapd
Use private command to get p2p device address

Change-Id: Ie490e38f1af9f259ff4a96b2f7d367119c65c377
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcm4329: fix array subscript is below array bounds
Choi, Jong-Hwan [Fri, 15 Jul 2011 01:56:25 +0000 (10:56 +0900)]
net: wireless: bcm4329: fix array subscript is below array bounds

Change-Id: I5d521895070d255f7ac0c9eaf262ec9f4cdd2f8a
Signed-off-by: Choi, Jong-Hwan <jhbird.choi@samsung.com>
13 years agoUSB: gadget: f_accessory: Add ioctl to detect USB accessory attached at boot
Mike Lockwood [Thu, 21 Jul 2011 18:39:17 +0000 (11:39 -0700)]
USB: gadget: f_accessory: Add ioctl to detect USB accessory attached at boot

Signed-off-by: Mike Lockwood <lockwood@android.com>
13 years agoearlysuspend: add verbose debug flag
Erik Gilling [Thu, 21 Jul 2011 21:07:45 +0000 (14:07 -0700)]
earlysuspend: add verbose debug flag

when enabled, prints out the function of each handler as they are called

Change-Id: I5ed251867e0e3aa3cd05f030ff3579808cedd0c2
Signed-off-by: Erik Gilling <konkers@android.com>
13 years agoUSB: gadget: f_mtp: Move all setup handling to mtp_ctrlrequest
Mike Lockwood [Thu, 21 Jul 2011 00:08:28 +0000 (17:08 -0700)]
USB: gadget: f_mtp: Move all setup handling to mtp_ctrlrequest

The composite driver no longer sends setup requests to functions if the
destination is USB_RECIP_DEVICE, so we need to handle the requests
here instead of the function's setup callback.

Signed-off-by: Mike Lockwood <lockwood@android.com>
13 years agopower: Add option to log time spent in suspend
Colin Cross [Tue, 19 Jul 2011 19:33:45 +0000 (12:33 -0700)]
power: Add option to log time spent in suspend

Prints the time spent in suspend in the kernel log, and
keeps statistics on the time spent in suspend in
/sys/kernel/debug/suspend_time

Change-Id: Ia6b9ebe4baa0f7f5cd211c6a4f7e813aefd3fa1d
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agocpufreq: interactive: fix checkpatch warnings on long lines
Allen Martin [Tue, 19 Jul 2011 21:56:21 +0000 (14:56 -0700)]
cpufreq: interactive: fix checkpatch warnings on long lines

Fix up checkpatch warning introduced by long lines in timer_rate
patch.

Change-Id: I22b105dafb1b49390799bb7577464da03f0f8afb
Signed-off-by: Allen Martin <amartin@nvidia.com>