firefly-linux-kernel-4.4.55.git
12 years agonetfilter: qtaguid: initialize a local var to keep compiler happy.
JP Abgrall [Sat, 14 Apr 2012 02:22:35 +0000 (19:22 -0700)]
netfilter: qtaguid: initialize a local var to keep compiler happy.

There was a case that might have seemed like new_tag_stat was not
initialized and actually used.
Added comment explaining why it was impossible, and a BUG()
in case the logic gets changed.

Change-Id: I1eddd1b6f754c08a3bf89f7e9427e5dce1dfb081
Signed-off-by: JP Abgrall <jpa@google.com>
12 years agonet: wireless: bcmdhd: Allow 80211_HT capability
Dmitry Shmidt [Thu, 12 Apr 2012 20:48:46 +0000 (13:48 -0700)]
net: wireless: bcmdhd: Allow 80211_HT capability

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Fix improper band handling
Dmitry Shmidt [Tue, 10 Apr 2012 22:44:41 +0000 (15:44 -0700)]
net: wireless: bcmdhd: Fix improper band handling

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agocpufreq: interactive: don't drop speed if recently at higher load
Todd Poynor [Sat, 7 Apr 2012 02:59:36 +0000 (19:59 -0700)]
cpufreq: interactive: don't drop speed if recently at higher load

Apply min_sample_time to the last time the current target speed
was originally requested or re-validated as appropriate for the
current load, not to the time since the current speed was
originally set.  Avoids periodic dips in speed during bursty
loads.

Change-Id: I250bda657985de60373f9897cc41f480664d51a1
Signed-off-by: Todd Poynor <toddpoynor@google.com>
12 years agocpufreq: interactive: set at least hispeed when above hispeed load
Todd Poynor [Sat, 7 Apr 2012 02:50:12 +0000 (19:50 -0700)]
cpufreq: interactive: set at least hispeed when above hispeed load

If load is above go_hispeed_load, always go to at least hispeed_freq,
even when reducing speed from a higher speed, not just when jumping
up from minimum speed.  Avoids running at a lower than intended
speed after a burst of even higher load.

Change-Id: I5b9d2a15ba25ce609b21bac7c724265cf6838dee
Signed-off-by: Todd Poynor <toddpoynor@google.com>
12 years agocpufreq: interactive: apply intermediate load to max speed not current
Todd Poynor [Fri, 6 Apr 2012 08:13:09 +0000 (01:13 -0700)]
cpufreq: interactive: apply intermediate load to max speed not current

Evaluate spikes in load (below go_hispeed_load) against the maximum
speed supported by the device, not the current speed (which tends to
make it too difficult to raise speed to intermediate levels until
very busy).

Change-Id: Ib937006abf8bedb60891a739acd733e89b732ae0
Signed-off-by: Todd Poynor <toddpoynor@google.com>
12 years agonet: wireless: bcmdhd: Update to version 5.90.195.53
Dmitry Shmidt [Thu, 5 Apr 2012 21:49:13 +0000 (14:49 -0700)]
net: wireless: bcmdhd: Update to version 5.90.195.53

- Add retry to wl_cfg80211_mgmt_tx() for P2P
- Change singal pending return value from -512 to -110
- Minor cleaning

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agoxt_IDLETIMER:
Ashish Sharma [Thu, 29 Mar 2012 20:02:27 +0000 (13:02 -0700)]
xt_IDLETIMER:
Add new netlink msg type for IDLETIMER.

Send notifications when the label becomes active after an idle period.
Send netlink message notifications in addition to sysfs notifications.

Change-Id: I31677ef00c94b5f82c8457e5bf9e5e584c23c523
Signed-off-by: Ashish Sharma <ashishsharma@google.com>
12 years agoswitch: add timestamps to switch driver
Erik Gilling [Mon, 2 Apr 2012 22:46:24 +0000 (15:46 -0700)]
switch: add timestamps to switch driver

Change-Id: Iac5b5279f45fcc6e506d801cb5e9d6d2f6f6f9fa
Signed-off-by: Erik Gilling <konkers@android.com>
12 years agonet: wireless: bcmdhd: Move FW hang processign to work queue
Dmitry Shmidt [Mon, 2 Apr 2012 17:27:13 +0000 (10:27 -0700)]
net: wireless: bcmdhd: Move FW hang processign to work queue

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Fix FW hang recovery
Dmitry Shmidt [Mon, 2 Apr 2012 17:23:59 +0000 (10:23 -0700)]
net: wireless: bcmdhd: Fix FW hang recovery

- Reduce IOCTL responce timeout to 2 sec (from 20)
- Fix pending status in case of timeout
- Pass error code from dhd_is_associated() call
- Call cfg80211_disconnected() if no timeout detected

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Fix frame sequence lag issue
Andrey Smolnikov [Mon, 2 Apr 2012 17:19:30 +0000 (10:19 -0700)]
net: wireless: bcmdhd: Fix frame sequence lag issue

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Fix crash in dhd_preinit_ioctls() band set
Dmitry Shmidt [Thu, 29 Mar 2012 19:10:36 +0000 (12:10 -0700)]
net: wireless: bcmdhd: Fix crash in dhd_preinit_ioctls() band set

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Add CONFIG_DHD_ENABLE_P2P Kconfig option
Dmitry Shmidt [Thu, 29 Mar 2012 19:09:23 +0000 (12:09 -0700)]
net: wireless: bcmdhd: Add CONFIG_DHD_ENABLE_P2P Kconfig option

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Turn off DHD_USE_EARLYSUSPEND option
Dmitry Shmidt [Tue, 27 Mar 2012 20:45:55 +0000 (13:45 -0700)]
net: wireless: bcmdhd: Turn off DHD_USE_EARLYSUSPEND option

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Update to Version 5.90.195.46
Dmitry Shmidt [Mon, 26 Mar 2012 20:30:33 +0000 (13:30 -0700)]
net: wireless: bcmdhd: Update to Version 5.90.195.46

- Fix WEXT compilation
- Start SoftAP in G-band only
- Fix IF_DEL timeout due to wrong status check
- Fix P2P to pass certification
- Enable arpoe in concurrent mode by default
- Fail to start sched scan in P2P GO

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Add 'wlan_ctrl_wake' wakelock
Dmitry Shmidt [Wed, 21 Mar 2012 19:35:56 +0000 (12:35 -0700)]
net: wireless: bcmdhd: Add 'wlan_ctrl_wake' wakelock

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agoandroid: logger: Allow a UID to read it's own log entries
Nick Kralevich [Thu, 23 Feb 2012 18:09:06 +0000 (10:09 -0800)]
android: logger: Allow a UID to read it's own log entries

Modify the kernel logger to record the UID associated with
the log entries. Always allow the same UID which generated a
log message to read the log message.

Allow anyone in the logs group, or anyone with CAP_SYSLOG, to
read all log entries.

In addition, allow the client to upgrade log formats, so they
can get additional information from the kernel.

Change-Id: Ie48fb614b43c9302a07ad2673b78dd8749b492b6
Signed-off-by: Nick Kralevich <nnk@google.com>
12 years agousb: gadget: adb: Only enable the gadget when adbd is ready
Benoit Goby [Tue, 20 Mar 2012 01:56:52 +0000 (18:56 -0700)]
usb: gadget: adb: Only enable the gadget when adbd is ready

When adb is enabled, only connect the gadget when adbd is ready. If adbd
dies or is restarted (e.g. "adb root"), the gadget is disconnected when
the adb device is close, and it is re-connected once adb re-open the
device.

- Add callbacks to adb, similar to FunctionFs callbacks, to notify the
  gadget when the daemon is ready or closed.
- Refcount calls to android_enable/android_disable to enable the gadget
  only once all the function daemons are ready.
- Add enable/disble to android_usb_function to notify the function when
  it is added/removed from the list of enabled functions.

Change-Id: Id54ff85aec9cf8715c94b4f9bd6137a79ad58bfc
Signed-off-by: Benoit Goby <benoit@android.com>
12 years agonet: wireless: bcmdhd: Set probe_resp.timestamp value to scan results
Dmitry Shmidt [Wed, 21 Mar 2012 00:04:02 +0000 (17:04 -0700)]
net: wireless: bcmdhd: Set probe_resp.timestamp value to scan results

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Add constant mDNS filter
Dmitry Shmidt [Tue, 20 Mar 2012 20:38:06 +0000 (13:38 -0700)]
net: wireless: bcmdhd: Add constant mDNS filter

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Add WL_CFG80211_STA_EVENT config option
Dmitry Shmidt [Tue, 20 Mar 2012 20:08:13 +0000 (13:08 -0700)]
net: wireless: bcmdhd: Add WL_CFG80211_STA_EVENT config option

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Update to Version 5.90.195.35
Dmitry Shmidt [Thu, 15 Mar 2012 19:47:26 +0000 (12:47 -0700)]
net: wireless: bcmdhd: Update to Version 5.90.195.35

- Add SoftAP auto-channel support
- P2P fixes

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Fix mac setting from platform hook
Dmitry Shmidt [Tue, 13 Mar 2012 22:25:46 +0000 (15:25 -0700)]
net: wireless: bcmdhd: Fix mac setting from platform hook

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Fix crash on timeout in wl_notify_escan_complete
Dmitry Shmidt [Tue, 13 Mar 2012 00:33:52 +0000 (17:33 -0700)]
net: wireless: bcmdhd: Fix crash on timeout in wl_notify_escan_complete

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Add sched-scan config option
Dmitry Shmidt [Mon, 12 Mar 2012 22:45:04 +0000 (15:45 -0700)]
net: wireless: bcmdhd: Add sched-scan config option

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Allow Improved suspend/resume processing on 2.6.39
Dmitry Shmidt [Mon, 5 Mar 2012 21:25:48 +0000 (13:25 -0800)]
net: wireless: bcmdhd: Allow Improved suspend/resume processing on 2.6.39

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Always turn Off wlan power on interface down
Dmitry Shmidt [Mon, 5 Mar 2012 18:17:06 +0000 (10:17 -0800)]
net: wireless: bcmdhd: Always turn Off wlan power on interface down

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonl80211/cfg80211: add match filtering for sched_scan
Luciano Coelho [Wed, 31 Aug 2011 13:01:48 +0000 (16:01 +0300)]
nl80211/cfg80211: add match filtering for sched_scan

Introduce filtering for scheduled scans to reduce the number of
unnecessary results (which cause useless wake-ups).

Add a new nested attribute where sets of parameters to be matched can
be passed when starting a scheduled scan.  Only scan results that
match any of the sets will be returned.

At this point, the set consists of a single parameter, an SSID.  This
can be easily extended in the future to support more complex matches.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Conflicts:

include/linux/nl80211.h
net/wireless/nl80211.c

12 years agonl80211/cfg80211: add max_sched_scan_ie_len in the hw description
Luciano Coelho [Wed, 13 Jul 2011 11:57:29 +0000 (14:57 +0300)]
nl80211/cfg80211: add max_sched_scan_ie_len in the hw description

Some chips may support different lengths of user-supplied IEs with a
single scheduled scan command than with a single normal scan command.

To support this, this patch creates a separate hardware description
element that describes the maximum size of user-supplied information
element data supported in scheduled scans.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonl80211/cfg80211: add max_sched_scan_ssids in the hw description
Luciano Coelho [Wed, 13 Jul 2011 11:57:28 +0000 (14:57 +0300)]
nl80211/cfg80211: add max_sched_scan_ssids in the hw description

Some chips can scan more SSIDs with a single scheduled scan command
than with a single normal scan command (eg. wl12xx chips).

To support this, this patch creates a separate hardware description
element that describes the amount of SSIDs supported in scheduled
scans.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Conflicts:

include/linux/nl80211.h

12 years agoARM: 7296/1: proc-v7.S: remove HARVARD_CACHE preprocessor guards
Will Deacon [Fri, 20 Jan 2012 11:10:18 +0000 (12:10 +0100)]
ARM: 7296/1: proc-v7.S: remove HARVARD_CACHE preprocessor guards

commit 612539e81f655f6ac73c7af1da8701c1ee618aee upstream.

On v7, we use the same cache maintenance instructions for data lines
as for unified lines. This was not the case for v6, where HARVARD_CACHE
was defined to indicate the L1 cache topology.

This patch removes the erroneous compile-time check for HARVARD_CACHE in
proc-v7.S, ensuring that we perform I-side invalidation at boot.

Reported-and-Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Catalin Marinas <Catalin.Marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agonet: wireless: bcmdhd: Add SETSUSPENDMODE command
Dmitry Shmidt [Tue, 28 Feb 2012 19:03:37 +0000 (11:03 -0800)]
net: wireless: bcmdhd: Add SETSUSPENDMODE command

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Minor cleaning
Dmitry Shmidt [Tue, 28 Feb 2012 18:30:59 +0000 (10:30 -0800)]
net: wireless: bcmdhd: Minor cleaning

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Add SET_RANDOM_MAC_SOFTAP option
Dmitry Shmidt [Mon, 27 Feb 2012 23:51:56 +0000 (15:51 -0800)]
net: wireless: bcmdhd: Add SET_RANDOM_MAC_SOFTAP option

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Update to Version 5.90.195.30
Dmitry Shmidt [Mon, 27 Feb 2012 22:02:51 +0000 (14:02 -0800)]
net: wireless: bcmdhd: Update to Version 5.90.195.30

- Fix STA features if P2P FW is in use
- Move ENABLE_P2P_INTERFACE to Makefile
- Minor fixes in PNO scan

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Update to Version 5.90.195.28
Dmitry Shmidt [Mon, 27 Feb 2012 20:35:15 +0000 (12:35 -0800)]
net: wireless: bcmdhd: Update to Version 5.90.195.28

- Improve scan for p2p
- Use use_rxchain support
- Use WL_WIRELESS_EXT instead of CONFIG_WIRELESS_EXT
- Initial sched_scan support

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agocfg80211: fix a crash in nl80211_send_station
Felix Fietkau [Thu, 11 Aug 2011 01:00:33 +0000 (19:00 -0600)]
cfg80211: fix a crash in nl80211_send_station

mac80211 leaves sinfo->assoc_req_ies uninitialized, causing a random
pointer memory access in nl80211_send_station.
Instead of checking if the pointer is null, use sinfo->filled, like
the rest of the fields.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonet: wireless: bcmdhd: Turn interface down (only) in case of FW crash
Dmitry Shmidt [Thu, 23 Feb 2012 18:36:40 +0000 (10:36 -0800)]
net: wireless: bcmdhd: Turn interface down (only) in case of FW crash

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Fix driver hang when resetting
Mike J. Chen [Thu, 16 Feb 2012 05:54:57 +0000 (21:54 -0800)]
net: wireless: bcmdhd: Fix driver hang when resetting

bus->tx_max was not being initialized when we do a reset and
the driver is statically linked.  this led to about a 50%
chance that it would be considered an illegal value when
we send the mac address to the FW.  add code to initialize
it to a safe value until we receive the right value from the fw.

Bug: 5974574

Change-Id: I28ab25d97203ef075e5354c25f85a25daaff5594
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agocpufreq interactive governor: event tracing
Todd Poynor [Fri, 17 Feb 2012 00:27:59 +0000 (16:27 -0800)]
cpufreq interactive governor: event tracing

Change-Id: Ic13614a3da2faa2d4bd215ca3eb7191614f0cf66
Signed-off-by: Todd Poynor <toddpoynor@google.com>
12 years agoInput: evdev - fix variable initialisation
Heiko Stuebner [Wed, 1 Feb 2012 18:33:01 +0000 (10:33 -0800)]
Input: evdev - fix variable initialisation

Commit 509f87c5f564 (evdev - do not block waiting for an event if
fd
is nonblock) created a code path were it was possible to use retval
uninitialized.

This could lead to the xorg evdev input driver getting corrupt data
and refusing to work with log messages like
AUO-Pixcir touchscreen: Read error: Success
sg060_keys: Read error: Success
AUO-Pixcir touchscreen: Read error: Success
sg060_keys: Read error: Success
(for drivers auo-pixcir-ts and gpio-keys).

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
12 years agoInput: evdev - Add ioctl to block suspend while event queue is not empty.
Arve Hjønnevåg [Fri, 17 Oct 2008 22:20:55 +0000 (15:20 -0700)]
Input: evdev - Add ioctl to block suspend while event queue is not empty.

Add an ioctl, EVIOCSSUSPENDBLOCK, to enable a wakelock that will block
suspend while the event queue is not empty. This allows userspace code to
process input events while the device appears to be asleep.

The current code holds the wakelock for up 5 seconds for every input
device and client. This can prevent suspend if sensor with a high data
rate is active, even when that sensor is not capable of waking the
device once it is suspended.

Change-Id: I624d66ef30a0b3abb543685c343382b8419b42b9
Signed-off-by: Arve Hjønnevåg <arve@android.com>
12 years agoInput: evdev - Don't hold wakelock when no data is available to user-space
Arve Hjønnevåg [Tue, 24 Jan 2012 01:15:45 +0000 (17:15 -0800)]
Input: evdev - Don't hold wakelock when no data is available to user-space

If there is no SYN_REPORT event in the buffer the buffer data is invisible
to user-space. The wakelock should not be held in this case.

Change-Id: Idae890ff0da8eb46a2cfce61a95b3a97252551ad
Signed-off-by: Arve Hjønnevåg <arve@android.com>
12 years agonet: wireless: bcmdhd: Increase pm_notify callback priority
Dmitry Shmidt [Tue, 31 Jan 2012 19:06:23 +0000 (11:06 -0800)]
net: wireless: bcmdhd: Increase pm_notify callback priority

Make pm_notify callback to be called the first on suspend/resume path to
ensure it will always be called.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Fix crash on dhdsdio_probe_attach() failure
Dmitry Shmidt [Mon, 30 Jan 2012 23:43:31 +0000 (15:43 -0800)]
net: wireless: bcmdhd: Fix crash on dhdsdio_probe_attach() failure

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Daemonize wl_event_handler
Dmitry Shmidt [Mon, 30 Jan 2012 21:03:19 +0000 (13:03 -0800)]
net: wireless: bcmdhd: Daemonize wl_event_handler

Daemonizing makes thread (besides other things) NON-FREEZABLE, and it will not
get fake signal on suspend to quicl down_interruptible()

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Update to Version 5.90.195.23
Dmitry Shmidt [Tue, 24 Jan 2012 21:59:40 +0000 (13:59 -0800)]
net: wireless: bcmdhd: Update to Version 5.90.195.23

- WFD fixes

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Update to Version 5.90.195.22
Dmitry Shmidt [Tue, 24 Jan 2012 21:55:00 +0000 (13:55 -0800)]
net: wireless: bcmdhd: Update to Version 5.90.195.22

- Disable Ad-hoc support for cfg80211
- dhd_linux.c: Fix incorrect pid check
- Merge Android changes from Android tree

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Update to Version 5.90.195.19
Dmitry Shmidt [Tue, 24 Jan 2012 21:47:47 +0000 (13:47 -0800)]
net: wireless: bcmdhd: Update to Version 5.90.195.19

- Add WFD changes
- Add extra locking for internal ioctl operations

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Update to Version 5.90.195.15
Dmitry Shmidt [Tue, 24 Jan 2012 21:37:34 +0000 (13:37 -0800)]
net: wireless: bcmdhd: Update to Version 5.90.195.15

- Add WFD concurrent mode support

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Add WIPHY_FLAG_SUPPORTS_FW_ROAM flag
Dmitry Shmidt [Mon, 23 Jan 2012 20:47:21 +0000 (12:47 -0800)]
net: wireless: bcmdhd: Add WIPHY_FLAG_SUPPORTS_FW_ROAM flag

Adding this flag will allow NL80211_ATTR_ROAM_SUPPORT, and will set
  WPA_DRIVER_FLAGS_BSS_SELECTION flag in wpa_supplicant

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Fake PNO event to wake up the wpa_supplicant
Dmitry Shmidt [Fri, 20 Jan 2012 22:15:05 +0000 (14:15 -0800)]
net: wireless: bcmdhd: Fake PNO event to wake up the wpa_supplicant

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agousb: gadget: android: Honor CONFIG_USB_GADGET_VBUS_DRAW
Scott Anderson [Wed, 18 Jan 2012 23:56:51 +0000 (15:56 -0800)]
usb: gadget: android: Honor CONFIG_USB_GADGET_VBUS_DRAW

The maximum current draw was hard coded to 500 mA.  composite.c
has code that uses CONFIG_USB_GADGET_VBUS_DRAW to set the
bMaxPower and to set whether or not the device is self-powered if
they haven't been set.  This change removes the code in android.c
to allow composite.c to set them.

Change-Id: I9db37922e91ee86e9e5c0e14519e119e5c41ca48
Signed-off-by: Scott Anderson <saa@google.com>
12 years agousb: gadget: Fix usb string id allocation
Benoit Goby [Fri, 20 Jan 2012 22:42:41 +0000 (14:42 -0800)]
usb: gadget: Fix usb string id allocation

Don't reset next_string_id every time the gadget is enabled, this makes
the next strings allocated overwrite strings allocated at probe time.
Instead, fix rndis not to allocate new string ids on every config bind.

Change-Id: Ied28ee416bb6f00c434c34176fe5b7f0dcb2b2d4
Signed-off-by: Benoit Goby <benoit@android.com>
12 years agonl80211/cfg80211: Make addition of new sinfo fields safer
Jouni Malinen [Thu, 11 Aug 2011 08:46:22 +0000 (11:46 +0300)]
nl80211/cfg80211: Make addition of new sinfo fields safer

Add a comment pointing out the use of enum station_info_flags for
all new struct station_info fields. In addition, memset the sinfo
buffer to zero before use on all paths in the current tree to avoid
leaving uninitialized pointers in the data.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agocfg80211/nl80211: Send AssocReq IEs to user space in AP mode
Jouni Malinen [Mon, 8 Aug 2011 09:11:52 +0000 (12:11 +0300)]
cfg80211/nl80211: Send AssocReq IEs to user space in AP mode

When user space SME/MLME (e.g., hostapd) is not used in AP mode, the
IEs from the (Re)Association Request frame that was processed in
firmware need to be made available for user space (e.g., RSN IE for
hostapd). Allow this to be done with cfg80211_new_sta().

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agomisc: remove android pmem driver, it's obsolete.
Dima Zavin [Mon, 23 Jan 2012 18:39:02 +0000 (10:39 -0800)]
misc: remove android pmem driver, it's obsolete.

Change-Id: I48d9778007e1e9eed2bb34e33ceee818c23afaa5
Signed-off-by: Dima Zavin <dima@android.com>
12 years agoRevert "proc: enable writing to /proc/pid/mem"
Dima Zavin [Thu, 19 Jan 2012 17:51:07 +0000 (09:51 -0800)]
Revert "proc: enable writing to /proc/pid/mem"

This reverts commit 198214a7ee50375fa71a65e518341980cfd4b2f0.

12 years agoram_console: set CON_ANYTIME console flag
Dima Zavin [Thu, 12 Jan 2012 23:55:25 +0000 (15:55 -0800)]
ram_console: set CON_ANYTIME console flag

We want to ensure that we get all the console messages, even ones
that occur while the printing CPU is not yet online.

Change-Id: I1d2694d05ac9415669a92f38efdd8e71c927705b
Signed-off-by: Dima Zavin <dima@android.com>
12 years agoRevert "usb: gadget: rndis: don't use dev_get_stats"
Benoit Goby [Fri, 16 Dec 2011 02:40:37 +0000 (18:40 -0800)]
Revert "usb: gadget: rndis: don't use dev_get_stats"

This reverts commit ffdab0c0c40bab6de78b1952bb07aed221994b73.

Not needed anymore in 2.6.39 and 3.0, dev_get_stats has been fixed
and may be called from atomic context. See:
1ac9ad1 net: remove dev_txq_stats_fold()

12 years agonet: wireless: bcmdhd: Enable wlan access on resume for all sdio functions
Dmitry Shmidt [Mon, 19 Dec 2011 18:24:09 +0000 (10:24 -0800)]
net: wireless: bcmdhd: Enable wlan access on resume for all sdio functions

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Fix P2P interface removal
Dmitry Shmidt [Fri, 16 Dec 2011 20:54:51 +0000 (12:54 -0800)]
net: wireless: bcmdhd: Fix P2P interface removal

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcm4329: Fix pno_enable if disassociated
Dmitry Shmidt [Thu, 15 Dec 2011 20:12:20 +0000 (12:12 -0800)]
net: wireless: bcm4329: Fix pno_enable if disassociated

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Fix proper scan command even if request is NULL
Dmitry Shmidt [Wed, 14 Dec 2011 01:39:48 +0000 (17:39 -0800)]
net: wireless: bcmdhd: Fix proper scan command even if request is NULL

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Decrease event wake_lock timeout to 1500 ms
Dmitry Shmidt [Tue, 13 Dec 2011 20:27:49 +0000 (12:27 -0800)]
net: wireless: bcmdhd: Decrease event wake_lock timeout to 1500 ms

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Fix getting arp_hostip table
Dmitry Shmidt [Mon, 12 Dec 2011 23:40:33 +0000 (15:40 -0800)]
net: wireless: bcmdhd: Fix getting arp_hostip table

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Allow to push more packets to FW for Tx
Dmitry Shmidt [Wed, 7 Dec 2011 00:27:37 +0000 (16:27 -0800)]
net: wireless: bcmdhd: Allow to push more packets to FW for Tx

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Fix scan crash in ibss mode
Dmitry Shmidt [Fri, 2 Dec 2011 21:24:01 +0000 (13:24 -0800)]
net: wireless: bcmdhd: Fix scan crash in ibss mode

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Add FW reloading in case of FW hang
Dmitry Shmidt [Fri, 2 Dec 2011 21:10:47 +0000 (13:10 -0800)]
net: wireless: bcmdhd: Add FW reloading in case of FW hang

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Update to Version 5.90.125.94.1
Dmitry Shmidt [Wed, 30 Nov 2011 20:49:02 +0000 (12:49 -0800)]
net: wireless: bcmdhd: Update to Version 5.90.125.94.1

- Return zeroed private command buffer
- Fix memory leak in wl_inform_single_bss()

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonet: wireless: bcmdhd: Use CONFIG_DHD_USE_STATIC_BUF for preallocated memory
Dmitry Shmidt [Sat, 12 Nov 2011 00:04:12 +0000 (16:04 -0800)]
net: wireless: bcmdhd: Use CONFIG_DHD_USE_STATIC_BUF for preallocated memory

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agowireless: Protect regdomain change by mutex
Dmitry Shmidt [Mon, 19 Dec 2011 20:32:21 +0000 (12:32 -0800)]
wireless: Protect regdomain change by mutex

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agommc: Set suspend/resume bus operations if CONFIG_PM_RUNTIME is used
Dmitry Shmidt [Sat, 17 Dec 2011 01:52:18 +0000 (17:52 -0800)]
mmc: Set suspend/resume bus operations if CONFIG_PM_RUNTIME is used

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agousb: gadget: android: Don't allow changing the functions list if enabled
Benoit Goby [Sat, 10 Dec 2011 02:05:00 +0000 (18:05 -0800)]
usb: gadget: android: Don't allow changing the functions list if enabled

Change-Id: I3ad39b420ce79a8602a7eca1daac1f56b30bad5c
Signed-off-by: Benoit Goby <benoit@android.com>
12 years agousb: gadget: android: Cancel pending ctrlrequest before disabling
Benoit Goby [Tue, 29 Nov 2011 21:49:27 +0000 (13:49 -0800)]
usb: gadget: android: Cancel pending ctrlrequest before disabling

Make sure there is no pending ctrlrequest before removing the config.
Otherwise the ctrlrequest complete callback could access structures
after they have been freed. Unbind cancels pending transfers but not
ep0 requests.

Bug: 5513065 5440193

Change-Id: I063c22bf5d104a3d2df71cf622409459fac5f27a
Signed-off-by: Benoit Goby <benoit@android.com>
12 years agoARM: idle: call idle notifiers before stopping nohz tick
Colin Cross [Wed, 30 Nov 2011 00:37:07 +0000 (16:37 -0800)]
ARM: idle: call idle notifiers before stopping nohz tick

If an idle notifier modifies a timer, calling the notifier after
the sched tick has been stopped may leave the sched tick set too
early.  Move teh idle notifier call before the call to
tick_nohz_stop_sched_tick.

Change-Id: I0db3284bec6d0193bc5e2a57650ab06bd8342319
Signed-off-by: Colin Cross <ccross@android.com>
12 years agousb: gadget: android: Reset next_string_id before enable
Benoit Goby [Tue, 29 Nov 2011 02:01:03 +0000 (18:01 -0800)]
usb: gadget: android: Reset next_string_id before enable

Reset next_string_id to 0 before enabling the gadget driver. Otherwise,
after a large number of enable/disable cycles, bind will fail
because we cannot allocate new string ids. String ids cannot be larger
than 254 per USB spec.

Change-Id: I44f5fece45008b7a0a18c025d4eb5ce842585c28
Signed-off-by: Benoit Goby <benoit@android.com>
12 years agoBluetooth: Keep master role when SCO or eSCO is active
hyungseoung.yoo [Fri, 18 Nov 2011 04:57:01 +0000 (13:57 +0900)]
Bluetooth: Keep master role when SCO or eSCO is active

This improves compatbility with a lot of headset / chipset
combinations. Ideally this should not be needed.

Change-Id: I8b676701e12e416aa7d60801b9d353b15d102709
Signed-off-by: hyungseoung.yoo <hyungseoung.yoo@samsung.com>
Signed-off-by: Jaikumar Ganesh <jaikumarg@android.com>
12 years agortc: Fix some bugs that allowed accumulating time drift in suspend/resume
Arve Hjønnevåg [Tue, 22 Nov 2011 22:56:50 +0000 (14:56 -0800)]
rtc: Fix some bugs that allowed accumulating time drift in suspend/resume

The current code checks if abs(delta_delta.tv_sec) is greater or
equal to two before it discards the old delta value, but this can
trigger at close to -1 seconds since -1.000000001 seconds is stored
as tv_sec -2 and tv_nsec 999999999 in a normalized timespec.

rtc_resume had an early return check if the rtc value had not changed
since rtc_suspend. This effectivly stops time for the duration of the
short sleep. Check if sleep_time is positive after all the adjustments
have been applied instead since this allows the old_system adjustment
in rtc_suspend to have an effect even for short sleep cycles.

Change-Id: I00b45c0349ec91a4bab9b41a126b377515427898
Signed-off-by: Arve Hjønnevåg <arve@android.com>
12 years agoFix "time: Catch invalid timespec sleep values in __timekeeping_inject_sleeptime...
Arve Hjønnevåg [Tue, 22 Nov 2011 23:28:27 +0000 (15:28 -0800)]
Fix "time: Catch invalid timespec sleep values in __timekeeping_inject_sleeptime" to compile on 3.0

Change-Id: I1225f279cda04dedbfb7f853f6b58f1032bd6d2b

12 years agotime: Catch invalid timespec sleep values in __timekeeping_inject_sleeptime
John Stultz [Thu, 2 Jun 2011 01:18:09 +0000 (18:18 -0700)]
time: Catch invalid timespec sleep values in __timekeeping_inject_sleeptime

Arve suggested making sure we catch possible negative sleep time
intervals that could be passed into timekeeping_inject_sleeptime.

CC: Arve Hjønnevåg <arve@android.com>
CC: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
12 years agortc: Avoid accumulating time drift in suspend/resume
John Stultz [Fri, 27 May 2011 18:33:18 +0000 (11:33 -0700)]
rtc: Avoid accumulating time drift in suspend/resume

Because the RTC interface is only a second granular interface,
each time we read from the RTC for suspend/resume, we introduce a
half second (on average) of error.

In order to avoid this error accumulating as the system is suspended
over and over, this patch measures the time delta between the RTC
and the system CLOCK_REALTIME.

If the delta is less then 2 seconds from the last suspend, we compensate
by using the previous time delta (keeping it close). If it is larger
then 2 seconds, we assume the clock was set or has been changed, so we
do no correction and update the delta.

Note: If NTP is running, ths could seem to "fight" with the NTP corrected
time, where as if the system time was off by 1 second, and NTP slewed the
value in, a suspend/resume cycle could undo this correction, by trying to
restore the previous offset from the RTC. However, without this patch,
since each read could cause almost a full second worth of error, its
possible to get almost 2 seconds of error just from the suspend/resume
cycle alone, so this about equal to any offset added by the compensation.

Further on systems that suspend/resume frequently, this should keep time
closer then NTP could compensate for if the errors were allowed to
accumulate.

Credits to Arve Hjønnevåg for suggesting this solution.

This patch also improves some of the variable names and adds more clear
comments.

CC: Arve Hjønnevåg <arve@android.com>
CC: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
13 years agomisc: remove kernel debugger core
Dima Zavin [Thu, 10 Nov 2011 00:07:17 +0000 (16:07 -0800)]
misc: remove kernel debugger core

The current split between this and the fiq debugger is awkward and does
not have any benefit (the interface between the two is also too simplistic).
The fiq debugger code itself needs a lot of refactoring, part of which
would be to split out some components that are arch indpendent.

So, for now, move this very small piece back into the fiq_debugger.

Change-Id: Ie4ec2a2f5d907be1691a0eb6ae9304aad29ecd14
Signed-off-by: Dima Zavin <dima@android.com>
13 years agoARM: common: fiq_debugger: dump sysrq directly to console if enabled
Dima Zavin [Thu, 10 Nov 2011 00:48:00 +0000 (16:48 -0800)]
ARM: common: fiq_debugger: dump sysrq directly to console if enabled

If the fiq console is enabled, then don't filter the console output
while sysrq command is in progress.

Change-Id: I9389d757373a5fdca5cbf61f0723667510d3ae88

13 years agoARM: common: fiq_debugger: add irq context debug functions
Dima Zavin [Thu, 10 Nov 2011 00:10:57 +0000 (16:10 -0800)]
ARM: common: fiq_debugger: add irq context debug functions

This code is moved here from the drivers/misc/kernel_debugger.

Change-Id: Iccf21c4313a8516a917125ca93f64baa5f354228
Signed-off-by: Dima Zavin <dima@android.com>
13 years agonet: wireless: bcmdhd: Call init_ioctl() only if was started properly for WEXT
Dmitry Shmidt [Wed, 9 Nov 2011 21:06:25 +0000 (13:06 -0800)]
net: wireless: bcmdhd: Call init_ioctl() only if was started properly for WEXT

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Call init_ioctl() only if was started properly
Dmitry Shmidt [Wed, 9 Nov 2011 21:00:24 +0000 (13:00 -0800)]
net: wireless: bcmdhd: Call init_ioctl() only if was started properly

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Fix possible memory leak in escan/iscan
Dmitry Shmidt [Fri, 4 Nov 2011 20:56:28 +0000 (13:56 -0700)]
net: wireless: bcmdhd: Fix possible memory leak in escan/iscan

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agocpufreq: interactive governor: default 20ms timer
Todd Poynor [Thu, 10 Nov 2011 00:56:18 +0000 (16:56 -0800)]
cpufreq: interactive governor: default 20ms timer

Change-Id: Ie9952f07b38667f2932474090044195c57976faa
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agocpufreq: interactive governor: go to intermediate hi speed before max
Todd Poynor [Wed, 9 Nov 2011 03:54:07 +0000 (19:54 -0800)]
cpufreq: interactive governor: go to intermediate hi speed before max

* Add attribute hispeed_freq, which defaults to max.

* Rename go_maxspeed_load to go_hispeed_load.

* If hit go_hispeed_load and at min speed, go to hispeed_freq;
  if hit go_hispeed_load and already above min speed go to max
  speed.

Change-Id: I1050dec5f013fc1177387352ba787a7e1c68703e
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agocpufreq: interactive governor: scale to max only if at min speed
Todd Poynor [Fri, 4 Nov 2011 04:22:54 +0000 (21:22 -0700)]
cpufreq: interactive governor: scale to max only if at min speed

Change-Id: Ieffb2aa56b5290036285c948718be7be0d3af9e8
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agocpufreq: interactive governor: apply intermediate load on current speed
Todd Poynor [Fri, 28 Oct 2011 01:25:59 +0000 (18:25 -0700)]
cpufreq: interactive governor: apply intermediate load on current speed

Calculate intermediate speed by applyng CPU load to current speed, not
max speed.

Change-Id: Idecf598b9a203b07c989c5d9e9c6efc67a1afc2e
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agoARM: idle: update idle ticks before call idle end notifier
Todd Poynor [Fri, 4 Nov 2011 04:05:41 +0000 (21:05 -0700)]
ARM: idle: update idle ticks before call idle end notifier

Such that interactive cpufreq governor uses up-to-date idle time
information.

Reported by Colin Cross <ccross@android.com>

Change-Id: I06425444f800f803afc9dc7a6ad0fdb46c918bb6
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agoinput: gpio_input: don't print debounce message unless flag is set
Dima Zavin [Tue, 8 Nov 2011 21:03:11 +0000 (13:03 -0800)]
input: gpio_input: don't print debounce message unless flag is set

Change-Id: I29ccb32e795c5c3e4c51c3d3a209f5b55dfd7d94
Signed-off-by: Dima Zavin <dima@android.com>
13 years agonet: wireless: bcm4329: Skip dhd_bus_stop() if bus is already down
Dmitry Shmidt [Fri, 4 Nov 2011 18:10:04 +0000 (11:10 -0700)]
net: wireless: bcm4329: Skip dhd_bus_stop() if bus is already down

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Skip dhd_bus_stop() if bus is already down
Dmitry Shmidt [Fri, 4 Nov 2011 18:08:37 +0000 (11:08 -0700)]
net: wireless: bcmdhd: Skip dhd_bus_stop() if bus is already down

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Improve suspend/resume processing
Dmitry Shmidt [Wed, 2 Nov 2011 23:51:29 +0000 (16:51 -0700)]
net: wireless: bcmdhd: Improve suspend/resume processing

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agonet: wireless: bcmdhd: Check if FW is Ok for internal FW call
Dmitry Shmidt [Wed, 2 Nov 2011 22:06:14 +0000 (15:06 -0700)]
net: wireless: bcmdhd: Check if FW is Ok for internal FW call

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agotcp: Don't nuke connections for the wrong protocol
Lorenzo Colitti [Fri, 4 Nov 2011 00:05:11 +0000 (17:05 -0700)]
tcp: Don't nuke connections for the wrong protocol

Currently, calling tcp_nuke_addr to reset IPv6 connections
resets IPv4 connections as well, because all Android
framework sockets are dual-stack (i.e., IPv6) sockets, and
we don't check the source address to see if the connection
was in fact an IPv4 connection.

Fix this by checking the source address and not resetting
the connection if it's a mapped address.

Also slightly tweak the IPv4 code path, which doesn't check
for mapped addresses either. This was not causing any
problems because tcp_is_local normally always returns true
for LOOPBACK4_IPV6 (127.0.0.6), because the loopback
interface is configured as as 127.0.0.0/8. However,
checking explicitly for LOOPBACK4_IPV6 makes the code a bit
more robust.

Bug: 5535055
Change-Id: I4d6ed3497c5b8643c864783cf681f088cf6b8d2a
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>