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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Allen Martin [Fri, 1 Jul 2011 06:54:07 +0000 (23:54 -0700)]
Documentation: cpufreq: add description of timer_rate
Add description of timer_rate tunable and clean up some
typos.
Change-Id: I4b96a36aad51eed3bef0ee5f571dc6e0a94c8dd9
Signed-off-by: Allen Martin <amartin@nvidia.com>
Ilia Kolomisnky [Fri, 15 Jul 2011 18:30:21 +0000 (18:30 +0000)]
Bluetooth: Fix crash with incoming L2CAP connections
Another regression fix considering incomming l2cap connections with
defer_setup enabled. In situations when incomming connection is
extracted with l2cap_sock_accept, it's bt_sock info will have
'parent' member zerroed, but 'parent' may be used unconditionally
in l2cap_conn_start() and l2cap_security_cfm() when defer_setup
is enabled.
Backtrace:
[<
bf02d5ac>] (l2cap_security_cfm+0x0/0x2ac [bluetooth]) from [<
bf01f01c>] (hci_event_pac
ket+0xc2c/0x4aa4 [bluetooth])
[<
bf01e3f0>] (hci_event_packet+0x0/0x4aa4 [bluetooth]) from [<
bf01a844>] (hci_rx_task+0x
cc/0x27c [bluetooth])
[<
bf01a778>] (hci_rx_task+0x0/0x27c [bluetooth]) from [<
c008eee4>] (tasklet_action+0xa0/
0x15c)
[<
c008ee44>] (tasklet_action+0x0/0x15c) from [<
c008f38c>] (__do_softirq+0x98/0x130)
r7:
00000101 r6:
00000018 r5:
00000001 r4:
efc46000
[<
c008f2f4>] (__do_softirq+0x0/0x130) from [<
c008f524>] (do_softirq+0x4c/0x58)
[<
c008f4d8>] (do_softirq+0x0/0x58) from [<
c008f5e0>] (run_ksoftirqd+0xb0/0x1b4)
r4:
efc46000 r3:
00000001
[<
c008f530>] (run_ksoftirqd+0x0/0x1b4) from [<
c009f2a8>] (kthread+0x84/0x8c)
r7:
00000000 r6:
c008f530 r5:
efc47fc4 r4:
efc41f08
[<
c009f224>] (kthread+0x0/0x8c) from [<
c008cc84>] (do_exit+0x0/0x5f0)
Signed-off-by: Ilia Kolomisnky <iliak@ti.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Gustavo F. Padovan [Fri, 15 Jul 2011 18:30:20 +0000 (18:30 +0000)]
Bluetooth: Fix regression in L2CAP connection procedure
Caused by the following commit, partially revert it.
commit
9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95
Author: Gustavo F. Padovan <padovan@profusion.mobi>
Date: Thu Jun 30 16:11:30 2011 -0300
Bluetooth: Fix regression with incoming L2CAP connections
PTS test A2DP/SRC/SRC_SET/TC_SRC_SET_BV_02_I revealed that
( probably after the
df3c3931e commit ) the l2cap connection
could not be established in case when the "Auth Complete" HCI
event does not arive before the initiator send "Configuration
request", in which case l2cap replies with "Command rejected"
since the channel is still in BT_CONNECT2 state.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tomas Targownik [Thu, 30 Jun 2011 19:30:44 +0000 (16:30 -0300)]
Bluetooth: Fix memory leak under page timeouts
If the remote device is not present, the connections attemp fails and
the struct hci_conn was not freed
Signed-off-by: Tomas Targownik <ttargownik@geicp.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan [Thu, 30 Jun 2011 19:11:30 +0000 (16:11 -0300)]
Bluetooth: Fix regression with incoming L2CAP connections
PTS test A2DP/SRC/SRC_SET/TC_SRC_SET_BV_02_I revealed that
( probably after the
df3c3931e commit ) the l2cap connection
could not be established in case when the "Auth Complete" HCI
event does not arive before the initiator send "Configuration
request", in which case l2cap replies with "Command rejected"
since the channel is still in BT_CONNECT2 state.
Based on patch from: Ilia Kolomisnky <iliak@ti.com>
Change-Id: Ifcffe0124adbbc6d1931389ff7476dd0304d6f51
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Peter Hurley [Thu, 30 Jun 2011 17:53:53 +0000 (13:53 -0400)]
Bluetooth: Fix hidp disconnect deadlocks and lost wakeup
Partial revert of commit
aabf6f89. When the hidp session thread
was converted from kernel_thread to kthread, the atomic/wakeups
were replaced with kthread_stop. kthread_stop has blocking semantics
which are inappropriate for the hidp session kthread. In addition,
the kthread signals itself to terminate in hidp_process_hid_control()
- it cannot do this with kthread_stop().
Lastly, a wakeup can be lost if the wakeup happens between checking
for the loop exit condition and setting the current state to
TASK_INTERRUPTIBLE. (Without appropriate synchronization mechanisms,
the task state should not be changed between the condition test and
the yield - via schedule() - as this creates a race between the
wakeup and resetting the state back to interruptible.)
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Dan Rosenberg [Fri, 24 Jun 2011 12:38:05 +0000 (08:38 -0400)]
Bluetooth: Prevent buffer overflow in l2cap config request
A remote user can provide a small value for the command size field in
the command header of an l2cap configuration request, resulting in an
integer underflow when subtracting the size of the configuration request
header. This results in copying a very large amount of data via
memcpy() and destroying the kernel heap. Check for underflow.
Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Chia-chi Yeh [Fri, 15 Jul 2011 22:32:57 +0000 (15:32 -0700)]
net: Only NET_ADMIN is allowed to fully control TUN interfaces.
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
Allen Martin [Fri, 1 Jul 2011 18:19:14 +0000 (11:19 -0700)]
cpufreq: interactive: cleanup checkpatch warnings
Cleanup some style warnings reported by checkpatch
Change-Id: Ie2e6903d52867fb3347e009d7efa3bc4ca755cea
Signed-off-by: Allen Martin <amartin@nvidia.com>
Allen Martin [Fri, 1 Jul 2011 18:17:39 +0000 (11:17 -0700)]
cpufreq: Add more verbose description of interactive governor
Update the Kconfig help paragraph to give more detail about
interactive governor.
Change-Id: I607b817b370accac3a685001649a15e2f7894f59
Signed-off-by: Allen Martin <amartin@nvidia.com>
Allen Martin [Fri, 1 Jul 2011 18:16:06 +0000 (11:16 -0700)]
Documentation: remove trailing whitespace in governors.txt
Fixes a checkpatch warning
Change-Id: I2962b7c32f336188de0d2fe4f0f13f1199cb68e2
Signed-off-by: Allen Martin <amartin@nvidia.com>
Allen Martin [Fri, 1 Jul 2011 06:54:07 +0000 (23:54 -0700)]
cpufreq: interactive: add sysfs control for timer rate
Add a new sysfs control that tunes the rate of the timer used to
increase cpu frequency
Change-Id: I1aa13ae54bb43aff5b3688984d2955f56aae1658
Signed-off-by: Allen Martin <amartin@nvidia.com>
Allen Martin [Thu, 30 Jun 2011 23:59:19 +0000 (16:59 -0700)]
cpufreq: interactive: Add error checking on sysfs interfaces
This adds better error checking on tunable parameters on sysfs
interfaces. Also fixes return value from these functions, previously
on success they would return 0 which would cause a infinite loop.
Change-Id: Ic05038492166f8673d007202092471f98a2f0dfa
Signed-off-by: Allen Martin <amartin@nvidia.com>
Allen Martin [Tue, 28 Jun 2011 16:58:39 +0000 (09:58 -0700)]
cpufreq: interactive: use idle notifier
Convert interactive governor to use idle notifier instead of
hooking pm_idle directly.
Change-Id: I47e007f330468ac559240a0ae8a3cb06a89ccb67
Signed-off-by: Allen Martin <amartin@nvidia.com>
Allen Martin [Tue, 28 Jun 2011 17:40:30 +0000 (10:40 -0700)]
cpufreq: interactive: remove debug trace code
Remove debug trace code in preparation of upstreaming
Change-Id: I0905885e75031f5e9d7cb06878fb68c1fd06d4fe
Signed-off-by: Allen Martin <amartin@nvidia.com>
Todd Poynor [Sat, 25 Jun 2011 02:33:01 +0000 (19:33 -0700)]
ARM: Move leds idle start/stop calls to idle notifiers
Change-Id: I5d8e4e85b17bbab7992ecb477f0bdb5e4138b166
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Thu, 16 Jun 2011 00:44:50 +0000 (17:44 -0700)]
ARM: Call idle notifiers
Change-Id: Id833e61c13baa1783705ac9e9046d1f0cc90c95e
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Thu, 16 Jun 2011 00:21:57 +0000 (17:21 -0700)]
Move x86_64 idle notifiers to generic
Move the x86_64 idle notifiers originally by Andi Kleen and Venkatesh
Pallipadi to generic.
Change-Id: Idf29cda15be151f494ff245933c12462643388d5
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Mike Lockwood [Thu, 14 Jul 2011 23:42:42 +0000 (19:42 -0400)]
USB: gadget: f_mtp: Add support for sending MTP header during file transfer
MTP_SEND_FILE_WITH_HEADER ioctl allows sending a file with the 12 byte header
prepended at the beginning.
This is to allow MTP to use a single packet for the data phase instead of two.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Dmitry Shmidt [Wed, 13 Jul 2011 22:09:00 +0000 (15:09 -0700)]
net: wireless: bcmdhd: Add PNO support through CFG80211 private command
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Rom Lemarchand [Wed, 13 Jul 2011 19:15:34 +0000 (12:15 -0700)]
net: wireless: bcmdhd: Fix build break with newer versions of gcc
In case the WPA cipher can't be determined the pval and gval variables don't
get updated which generates a warning in newer versions of gcc (tested with
4.5.2). Since the bcmdhd driver gets compiled with warnings treated as errors
this change is needed to fix the build.
Change-Id: Ia483777fee54ac526bb0db7c666fa2bf5df17354
Signed-off-by: Rom Lemarchand <rlemarchand@sta.samsung.com>
Dmitry Shmidt [Wed, 13 Jul 2011 17:43:20 +0000 (10:43 -0700)]
net: wireless: bcm4329: Fix roaming message processing
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 12 Jul 2011 18:19:48 +0000 (11:19 -0700)]
net: wireless: bcmdhd: Add country private command
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 12 Jul 2011 00:17:23 +0000 (17:17 -0700)]
net: wireless: bcm4329: Add packet filtering commands
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Colin Cross [Wed, 13 Jul 2011 02:53:24 +0000 (19:53 -0700)]
cgroup: Add generic cgroup subsystem permission checks
Rather than using explicit euid == 0 checks when trying to move
tasks into a cgroup via CFS, move permission checks into each
specific cgroup subsystem. If a subsystem does not specify a
'allow_attach' handler, then we fall back to doing our checks
the old way.
Use the 'allow_attach' handler for the 'cpu' cgroup to allow
non-root processes to add arbitrary processes to a 'cpu' cgroup
if it has the CAP_SYS_NICE capability set.
This version of the patch adds a 'allow_attach' handler instead
of reusing the 'can_attach' handler. If the 'can_attach' handler
is reused, a new cgroup that implements 'can_attach' but not
the permission checks could end up with no permission checks
at all.
Change-Id: Icfa950aa9321d1ceba362061d32dc7dfa2c64f0c
Original-Author: San Mehat <san@google.com>
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Wed, 13 Jul 2011 03:12:45 +0000 (20:12 -0700)]
Revert "cgroup: Add generic cgroup subsystem permission checks."
This reverts commit
1d38bc7d0523af2233b4280e2aeab34c6a076665.
Change-Id: I2c5066b696cbdd5ca117ed74718bcb7e70e878e7
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Wed, 13 Jul 2011 03:10:37 +0000 (20:10 -0700)]
Merge commit 'v3.0-rc7' into android-3.0
JP Abgrall [Tue, 12 Jul 2011 19:02:59 +0000 (12:02 -0700)]
netfitler: fixup the quota2, and enable.
The xt_quota2 came from
http://sourceforge.net/projects/xtables-addons/develop
It needed tweaking for it to compile within the kernel tree.
Fixed kmalloc() and create_proc_entry() invocations within
a non-interruptible context.
Removed useless copying of current quota back to the iptable's
struct matchinfo:
- those are per CPU: they will change randomly based on which
cpu gets to update the value.
- they prevent matching a rule: e.g.
-A chain -m quota2 --name q1 --quota 123
can't be followed by
-D chain -m quota2 --name q1 --quota 123
as the 123 will be compared to the struct matchinfo's quota member.
Change-Id: I021d3b743db3b22158cc49acb5c94d905b501492
Signed-off-by: JP Abgrall <jpa@google.com>
Linus Torvalds [Mon, 11 Jul 2011 23:51:52 +0000 (16:51 -0700)]
Linux 3.0-rc7
Linus Torvalds [Mon, 11 Jul 2011 23:48:38 +0000 (16:48 -0700)]
Documentation/Changes: remove some really obsolete text
That file harkens back to the days of the big 2.4 -> 2.6 version jump,
and was based even then on older versions. Some of it is just obsolete,
and Jesper Juhl points out that it talks about kernel versions 2.6 and
should be updated to 3.0.
Remove some obsolete text, and re-phrase some other to not be 2.6-specific.
Reported-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Mon, 11 Jul 2011 23:43:27 +0000 (16:43 -0700)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
[media] msp3400: fill in v4l2_tuner based on vt->type field
[media] tuner-core.c: don't change type field in g_tuner or g_frequency
[media] cx18/ivtv: fix g_tuner support
[media] tuner-core: power up tuner when called with s_power(1)
[media] v4l2-ioctl.c: check for valid tuner type in S_HW_FREQ_SEEK
[media] tuner-core: simplify the standard fixup
[media] tuner-core/v4l2-subdev: document that the type field has to be filled in
[media] v4l2-subdev.h: remove unused s_mode tuner op
[media] feature-removal-schedule: change in how radio device nodes are handled
[media] bttv: fix s_tuner for radio
[media] pvrusb2: fix g/s_tuner support
[media] v4l2-ioctl.c: prefill tuner type for g_frequency and g/s_tuner
[media] tuner-core: fix tuner_resume: use t->mode instead of t->type
[media] tuner-core: fix s_std and s_tuner
JP Abgrall [Tue, 21 Jun 2011 18:14:49 +0000 (11:14 -0700)]
netfilter: adding the original quota2 from xtables-addons
The original xt_quota in the kernel is plain broken:
- counts quota at a per CPU level
(was written back when ubiquitous SMP was just a dream)
- provides no way to count across IPV4/IPV6.
This patch is the original unaltered code from:
http://sourceforge.net/projects/xtables-addons
at commit
e84391ce665cef046967f796dd91026851d6bbf3
Change-Id: I19d49858840effee9ecf6cff03c23b45a97efdeb
Signed-off-by: JP Abgrall <jpa@google.com>
Colin Cross [Fri, 24 Jun 2011 22:58:51 +0000 (15:58 -0700)]
USB: otg: add otg id notifier utiltiies
Add a otg_id notifier to allow multiple drivers to cooperate to
determine the type of cable connected to a USB connector without
requiring direct calls between the drivers.
Change-Id: Ic5675f1a89daf85b17336765de24e4bdb6df6348
Signed-off-by: Colin Cross <ccross@android.com>
Dima Zavin [Fri, 8 Jul 2011 06:20:27 +0000 (23:20 -0700)]
pda_power: add support for using otg transceiver events
If the platform data sets the use_otg_notifier flag,
the driver will now register an otg notifier callback and listen
to transceiver events for AC/USB plug-in events instead. This would
normally be used by not specifying is_xx_online callbacks and
not specifying any irqs so the state machine is completely driven
from OTG xceiver events.
Change-Id: Ic4b3bc4010f299156e41fd2411696c7ff5a88e92
Signed-off-by: Dima Zavin <dima@android.com>
Linus Torvalds [Mon, 11 Jul 2011 19:49:03 +0000 (12:49 -0700)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/suspend-2.6
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
PM: Reintroduce dropped call to check_wakeup_irqs
Linus Torvalds [Mon, 11 Jul 2011 19:48:24 +0000 (12:48 -0700)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
cifs: drop spinlock before calling cifs_put_tlink
cifs: fix expand_dfs_referral
cifs: move bdi_setup_and_register outside of CONFIG_CIFS_DFS_UPCALL
cifs: factor smb_vol allocation out of cifs_setup_volume_info
cifs: have cifs_cleanup_volume_info not take a double pointer
cifs: fix build_unc_path_to_root to account for a prefixpath
cifs: remove bogus call to cifs_cleanup_volume_info
Linus Torvalds [Mon, 11 Jul 2011 19:47:53 +0000 (12:47 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/davej/cpufreq
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] fix cpumask memory leak in acpi-cpufreq on cpu hotplug.
Linus Torvalds [Mon, 11 Jul 2011 19:47:09 +0000 (12:47 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mjg59/platform-drivers-x86
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
hp-wmi: fix use after free
dell-laptop - using buffer without mutex_lock
Revert: "dell-laptop: Toggle the unsupported hardware killswitch"
platform-drivers-x86: set backlight type to BACKLIGHT_PLATFORM
thinkpad-acpi: handle HKEY 0x4010, 0x4011 events
drivers/platform/x86: Fix memory leak
thinkpad-acpi: handle some new HKEY 0x60xx events
acer-wmi: fix bitwise bug when set device state
acer-wmi: Only update rfkill status for associated hotkey events
Linus Torvalds [Mon, 11 Jul 2011 19:46:39 +0000 (12:46 -0700)]
Merge branch 'movieboard' of git://git./linux/kernel/git/ieee1394/linux1394-2.6
* 'movieboard' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
firewire: ohci: do not bind to Pinnacle cards, avert panic
Joe Perches [Sun, 10 Jul 2011 09:28:26 +0000 (02:28 -0700)]
ath5k: Add missing breaks in switch/case
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Muthu Kumar [Mon, 11 Jul 2011 18:04:58 +0000 (11:04 -0700)]
Documentation/spinlocks.txt: Remove reference to sti()/cli()
Since we removed sti()/cli() and related, how about removing it from
Documentation/spinlocks.txt?
Signed-off-by: Muthukumar R <muthur@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Vinicius Costa Gomes [Fri, 8 Jul 2011 21:31:46 +0000 (18:31 -0300)]
Bluetooth: Add support for returning the encryption key size
This will be useful when userspace wants to restrict some kinds of
operations based on the length of the key size used to encrypt the
link.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Fri, 8 Jul 2011 21:31:45 +0000 (18:31 -0300)]
Bluetooth: Add support for storing the key size
In some cases it will be useful having the key size used for
encrypting the link. For example, some profiles may restrict
some operations depending on the key length.
The key size is stored in the key that is passed to userspace
using the pin_length field in the key structure.
For now this field is only valid for LE controllers. 3.0+HS
controllers define the Read Encryption Key Size command, this
field is intended for storing the value returned by that
command.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Fri, 8 Jul 2011 21:31:44 +0000 (18:31 -0300)]
Bluetooth: Add support for communicating keys with userspace
As the key format has changed to something that has a dynamic size,
the way that keys are received and sent must be changed.
The structure fields order is changed to make the parsing of the
information received from the Management Interface easier.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:42 +0000 (18:59 -0300)]
Bluetooth: Remove unused field in hci_conn
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:41 +0000 (18:59 -0300)]
Bluetooth: Use the stored LTK for restabilishing security
Now that it's possible that the exchanged key is present in
the link key list, we may be able to estabilish security with
an already existing key, without need to perform any SMP
procedure.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:40 +0000 (18:59 -0300)]
Bluetooth: Use the link key list to temporarily store the STK
With this we can use only one place to store all keys, without
need to use a field in the connection structure for this
purpose.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:39 +0000 (18:59 -0300)]
Bluetooth: Add support for storing the LTK
Now when the LTK is received from the remote or generated it is stored,
so it can later be used.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:38 +0000 (18:59 -0300)]
Bluetooth: Fix SM pairing parameters negotiation
Before implementing SM key distribution, the pairing features
exchange must be better negotiated, taking into account some
features of the host and connection requirements.
If we are in the "not pairable" state, it makes no sense to
exchange any key. This allows for simplification of the key
negociation method.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:37 +0000 (18:59 -0300)]
Bluetooth: Reject an encryption request when the key isn't found
Now that we have methods to finding keys by its parameters we can
reject an encryption request if the key isn't found.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>