Commit Graph

256333 Commits

Author SHA1 Message Date
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
Dmitry Shmidt
c561cedf2b net: wireless: bcmdhd: Allow to push more packets to FW for Tx
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-12-19 13:22:44 -08:00
Dmitry Shmidt
4f36cb88d6 net: wireless: bcmdhd: Fix scan crash in ibss mode
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-12-19 13:22:43 -08:00
Dmitry Shmidt
af16732d4c net: wireless: bcmdhd: Add FW reloading in case of FW hang
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-12-19 13:22:43 -08:00
Dmitry Shmidt
7caeacd6ed 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>
2011-12-19 13:22:43 -08:00
Dmitry Shmidt
8d71d882e7 net: wireless: bcmdhd: Use CONFIG_DHD_USE_STATIC_BUF for preallocated memory
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-12-19 13:22:43 -08:00
Dmitry Shmidt
35047200c4 wireless: Protect regdomain change by mutex
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-12-19 12:32:21 -08:00
Dmitry Shmidt
ea693bf7f8 mmc: Set suspend/resume bus operations if CONFIG_PM_RUNTIME is used
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-12-19 10:53:18 -08:00
Benoit Goby
dc1b634039 usb: gadget: android: Don't allow changing the functions list if enabled
Change-Id: I3ad39b420ce79a8602a7eca1daac1f56b30bad5c
Signed-off-by: Benoit Goby <benoit@android.com>
2011-12-09 18:54:56 -08:00
Benoit Goby
e0de0a507d 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>
2011-11-29 19:34:20 -08:00
Colin Cross
b86fd0b622 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>
2011-11-29 18:00:09 -08:00
Benoit Goby
6a4a38525d 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>
2011-11-28 19:02:13 -08:00
hyungseoung.yoo
dbb18fb2c1 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>
2011-11-28 15:34:39 -08:00
Arve Hjønnevåg
9d187300df 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>
2011-11-22 16:49:58 -08:00
Arve Hjønnevåg
452d440ab2 Fix "time: Catch invalid timespec sleep values in __timekeeping_inject_sleeptime" to compile on 3.0
Change-Id: I1225f279cda04dedbfb7f853f6b58f1032bd6d2b
2011-11-22 16:49:43 -08:00
John Stultz
cf70c6a400 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>
2011-11-22 16:49:29 -08:00
John Stultz
340ede3671 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>
2011-11-22 16:49:26 -08:00
Dima Zavin
9ab6a29787 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>
2011-11-14 10:27:10 -08:00