Commit Graph

256350 Commits

Author SHA1 Message Date
Nick Kralevich
d993be54c1 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>
2012-03-21 16:12:05 -07:00
Benoit Goby
17ce6ff951 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>
2012-03-21 15:55:56 -07:00
Dmitry Shmidt
5a6caf91b0 net: wireless: bcmdhd: Set probe_resp.timestamp value to scan results
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-03-20 17:30:54 -07:00
Dmitry Shmidt
51feefe956 net: wireless: bcmdhd: Add constant mDNS filter
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-03-20 17:30:42 -07:00
Dmitry Shmidt
91f01cca68 net: wireless: bcmdhd: Add WL_CFG80211_STA_EVENT config option
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-03-20 17:30:32 -07:00
Dmitry Shmidt
4b04b81571 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>
2012-03-16 12:40:26 -07:00
Dmitry Shmidt
239e39f268 net: wireless: bcmdhd: Fix mac setting from platform hook
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-03-14 16:36:41 -07:00
Dmitry Shmidt
1aa5b7f6a0 net: wireless: bcmdhd: Fix crash on timeout in wl_notify_escan_complete
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-03-14 16:36:31 -07:00
Dmitry Shmidt
3a9ec4f0e4 net: wireless: bcmdhd: Add sched-scan config option
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-03-14 16:36:13 -07:00
Dmitry Shmidt
69f963b089 net: wireless: bcmdhd: Allow Improved suspend/resume processing on 2.6.39
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-03-14 16:36:01 -07:00
Dmitry Shmidt
cfb4b9defb net: wireless: bcmdhd: Always turn Off wlan power on interface down
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-03-14 16:35:51 -07:00
Luciano Coelho
7cf474df22 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
2012-03-13 10:49:17 -07:00
Luciano Coelho
001692ab00 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>
2012-03-13 10:49:17 -07:00
Luciano Coelho
2e128bd956 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
2012-03-13 10:49:17 -07:00
Will Deacon
2cdb45d19e ARM: 7296/1: proc-v7.S: remove HARVARD_CACHE preprocessor guards
commit 612539e81f 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>
2012-03-09 21:44:42 -08:00
Dmitry Shmidt
e078a22b6f net: wireless: bcmdhd: Add SETSUSPENDMODE command
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-02-29 10:46:09 -08:00
Dmitry Shmidt
46ec987de3 net: wireless: bcmdhd: Minor cleaning
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-02-29 10:46:08 -08:00
Dmitry Shmidt
ee88a6c5e2 net: wireless: bcmdhd: Add SET_RANDOM_MAC_SOFTAP option
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-02-29 10:46:08 -08:00
Dmitry Shmidt
2757c71245 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>
2012-02-29 10:46:07 -08:00
Dmitry Shmidt
1282ad1837 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>
2012-02-29 10:46:07 -08:00
Felix Fietkau
254c20edd7 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>
2012-02-29 10:35:49 -08:00
Dmitry Shmidt
d93cdf396d net: wireless: bcmdhd: Turn interface down (only) in case of FW crash
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-02-23 13:19:22 -08:00
Mike J. Chen
bfebf726b0 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>
2012-02-23 13:18:39 -08:00
Todd Poynor
4d6f3d7209 cpufreq interactive governor: event tracing
Change-Id: Ic13614a3da2faa2d4bd215ca3eb7191614f0cf66
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-02-17 14:37:00 -08:00
Heiko Stuebner
1f8c5cecfe Input: evdev - fix variable initialisation
Commit 509f87c5f5 (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>
2012-02-01 10:57:42 -08:00
Arve Hjønnevåg
4dc43d7079 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>
2012-01-31 16:00:27 -08:00
Arve Hjønnevåg
7cc846069a 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>
2012-01-31 16:00:26 -08:00
Dmitry Shmidt
0e80804a2e 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>
2012-01-31 13:31:53 -08:00
Dmitry Shmidt
dfc896e1c8 net: wireless: bcmdhd: Fix crash on dhdsdio_probe_attach() failure
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-01-31 13:31:37 -08:00
Dmitry Shmidt
256a6b23be 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>
2012-01-31 13:31:15 -08:00
Dmitry Shmidt
ff93146589 net: wireless: bcmdhd: Update to Version 5.90.195.23
- WFD fixes

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-01-27 15:32:34 -08:00
Dmitry Shmidt
96034c2006 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>
2012-01-27 15:32:33 -08:00
Dmitry Shmidt
494661a1ac 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>
2012-01-27 15:32:33 -08:00
Dmitry Shmidt
1dddb0cc0d net: wireless: bcmdhd: Update to Version 5.90.195.15
- Add WFD concurrent mode support

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-01-27 15:32:32 -08:00
Dmitry Shmidt
52bdb6f543 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>
2012-01-27 15:32:32 -08:00
Dmitry Shmidt
b1a94205e9 net: wireless: bcmdhd: Fake PNO event to wake up the wpa_supplicant
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-01-27 15:32:32 -08:00
Scott Anderson
09701e3edf 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>
2012-01-25 17:13:15 -08:00
Benoit Goby
a6ccb73389 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>
2012-01-25 13:53:58 -08:00
Jouni Malinen
87159de9c3 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>
2012-01-24 15:33:15 -08:00
Jouni Malinen
d692df224b 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>
2012-01-24 15:30:44 -08:00
Dima Zavin
d1e94136fc misc: remove android pmem driver, it's obsolete.
Change-Id: I48d9778007e1e9eed2bb34e33ceee818c23afaa5
Signed-off-by: Dima Zavin <dima@android.com>
2012-01-23 10:39:02 -08:00
Dima Zavin
dac306d896 Revert "proc: enable writing to /proc/pid/mem"
This reverts commit 198214a7ee.
2012-01-19 10:52:03 -08:00
Dima Zavin
a65e28a014 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>
2012-01-12 15:58:33 -08:00
Benoit Goby
f16e6fb3e3 Revert "usb: gadget: rndis: don't use dev_get_stats"
This reverts commit ffdab0c0c4.

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()
2011-12-19 14:00:21 -08:00
Dmitry Shmidt
e1493f1544 net: wireless: bcmdhd: Enable wlan access on resume for all sdio functions
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-12-19 13:22:50 -08:00
Dmitry Shmidt
bbd08c6e95 net: wireless: bcmdhd: Fix P2P interface removal
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-12-19 13:22:49 -08:00
Dmitry Shmidt
37ff4411a5 net: wireless: bcm4329: Fix pno_enable if disassociated
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-12-19 13:22:48 -08:00
Dmitry Shmidt
599c8566fa net: wireless: bcmdhd: Fix proper scan command even if request is NULL
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-12-19 13:22:48 -08:00
Dmitry Shmidt
f227b88c89 net: wireless: bcmdhd: Decrease event wake_lock timeout to 1500 ms
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-12-19 13:22:47 -08:00
Dmitry Shmidt
ed3f356087 net: wireless: bcmdhd: Fix getting arp_hostip table
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-12-19 13:22:44 -08:00