11 Jan, 2012
1 commit
05 Jan, 2012
2 commits
-
…wireless into for-davem
04 Jan, 2012
1 commit
-
…wireless-next into for-davem
Conflicts:
drivers/net/wireless/b43/dma.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
03 Jan, 2012
14 commits
-
Remove unneeded skb_pull and correct packet length calculation
removing magic number. Move BT_DBG after len check otherwise
it could possibly access wrong memory.Signed-off-by: Andrei Emeltchenko
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Those vars need to be in sync, otherwise l2cap_core.c can get the wrong
state.Signed-off-by: Gustavo F. Padovan
-
Those locks are not shared between interrupt and process context anymore,
so remove the part that disable interrupts. We are still safe because
preemption is disabled.Signed-off-by: Gustavo F. Padovan
-
Stop Discovery Command Status Event should use mgmt status code.
Signed-off-by: Andre Guedes
Acked-by: Johan Hedberg
Signed-off-by: Gustavo F. Padovan -
This patch queues hdev->adv_work on the system-wide workqueue
instead of on hdev->workqueue. This way we keep only tx/rx works
on hdev->workqueue.Signed-off-by: Andre Guedes
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
This patch fixes the adv_work delay. It should be set to ADV_
CLEAR_TIMEOUT instead of (jiffies + ADV_CLEAR_TIMEOUT) since
queue_delayed_work() receives the number of jiffies to wait
before queueing. It also removes the unnecessary cancel_delayed_
work_sync() call in case LE scan has been disabled.Signed-off-by: Andre Guedes
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Copy the Features value according to the Page number.
Signed-off-by: Andre Guedes
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
This patch renames hdev->extfeatures to hdev->host_features since it
holds the extended features Page 1 (aka host features).Signed-off-by: Andre Guedes
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
We don't need it anymore.
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Everything is in process context now, we do not need such a call.
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Those locks are not shared between interrupt and process context anymore,
so remove the part that disable interrupts. We are still safe because
preemption is disabled.Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
We now run in process context, no need to disable interrupts.
Calls from the tty layer also run in process context.rw_lock was converted to spinlock, we have more writers than readers in
this case.Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Code now run in process context, does not need to disable interrupt
anymore.Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
It should be the dst in the copy not src. 03a001948 introduced this bug.
Reported-by: Vinicius Costa Gomes
Signed-off-by: Gustavo F. Padovan
28 Dec, 2011
1 commit
-
sock and sk were leftover from another change.
Signed-off-by: Gustavo F. Padovan
24 Dec, 2011
3 commits
-
Conflicts:
net/bluetooth/l2cap_core.cJust two overlapping changes, one added an initialization of
a local variable, and another change added a new local variable.Signed-off-by: David S. Miller
-
This reverts commit e1b6eb3ccb0c2a34302a9fd87dd15d7b86337f23.
This was causing a delay of 10 seconds in the resume process of a Thinkpad
laptop. I'm afraid this could affect more devices once 3.2 is released.Reported-by: Tomáš Janoušek
Signed-off-by: Gustavo F. Padovan -
This patch fixes incorrect address storage while storing
Long Term Key for LE Devices using SMP (Security Manager Protocol).
The address stored should be of remote device and not of source device.Signed-off-by: Hemant Gupta
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan
23 Dec, 2011
10 commits
-
We run everything in process context now.
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
They don't need to disable interrupts anymore, we only run in process
context now.Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
RFCOMM needs a proper priority mechanism inside itself and not try to use
l2cap priority to fix its own problem.Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Low Energy pairing is performed through the SMP (Security Manager Protocol)
mechanism rather than HCI.Signed-off-by: Brian Gix
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
To achive Man-In-The-Middle (MITM) level security with Low Energy,
we have to enable User Passkey Comparison. This commit modifies the
hard-coded JUST-WORKS pairing mechanism to support query via the MGMT
interface of Passkey comparison and User Confirmation.Signed-off-by: Brian Gix
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
When cancelling a delayed work (timer) in L2CAP we can not sleep holding
the sock mutex otherwise we might deadlock with an L2CAP timer handler.
This is possible because RX/TX and L2CAP timers run in different workqueues.
The scenario below illustrates the problem. Thus we are now avoiding to
sleep on the timers locks.======================================================
[ INFO: possible circular locking dependency detected ]
3.1.0-05270-ga978dc7-dirty #239
-------------------------------------------------------
kworker/1:1/873 is trying to acquire lock:
(sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+...}, at: [] l2cap_chan_timeout+0x3c/0xe0 [bluetooth]but task is already holding lock:
((&(&chan->chan_timer)->work)){+.+...}, at: [] process_one_work+0x126/0x450which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 ((&(&chan->chan_timer)->work)){+.+...}:
[] check_prevs_add+0xf6/0x170
[] validate_chain+0x613/0x790
[] __lock_acquire+0x4be/0xac0
[] lock_acquire+0x8d/0xb0
[] wait_on_work+0x4f/0x160
[] __cancel_work_timer+0x73/0x80
[] cancel_delayed_work_sync+0xd/0x10
[] l2cap_chan_connect+0x22d/0x470 [bluetooth]
[] l2cap_sock_connect+0xb1/0x140 [bluetooth]
[] kernel_connect+0xb/0x10
[] rfcomm_session_create+0x12a/0x1c0 [rfcomm]
[] __rfcomm_dlc_open+0x1c7/0x240 [rfcomm]
[] rfcomm_dlc_open+0x42/0x70 [rfcomm]
[] rfcomm_sock_connect+0x103/0x150 [rfcomm]
[] sys_connect+0xae/0xc0
[] compat_sys_socketcall+0xb2/0x220
[] sysenter_dispatch+0x7/0x30-> #0 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+...}:
[] check_prev_add+0x6cd/0x6e0
[] check_prevs_add+0xf6/0x170
[] validate_chain+0x613/0x790
[] __lock_acquire+0x4be/0xac0
[] lock_acquire+0x8d/0xb0
[] lock_sock_nested+0x8a/0xa0
[] l2cap_chan_timeout+0x3c/0xe0 [bluetooth]
[] process_one_work+0x184/0x450
[] worker_thread+0x15e/0x340
[] kthread+0x96/0xa0
[] kernel_thread_helper+0x4/0x10other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock((&(&chan->chan_timer)->work));
lock(sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP);
lock((&(&chan->chan_timer)->work));
lock(sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP);*** DEADLOCK ***
2 locks held by kworker/1:1/873:
#0: (events){.+.+.+}, at: [] process_one_work+0x126/0x450
#1: ((&(&chan->chan_timer)->work)){+.+...}, at: [] process_one_work+0x126/0x450stack backtrace:
Pid: 873, comm: kworker/1:1 Not tainted 3.1.0-05270-ga978dc7-dirty #239
Call Trace:
[] print_circular_bug+0xd2/0xe3
[] check_prev_add+0x6cd/0x6e0
[] check_prevs_add+0xf6/0x170
[] validate_chain+0x613/0x790
[] __lock_acquire+0x4be/0xac0
[] ? lock_sock_nested+0x66/0xa0
[] ? lock_release_nested+0x100/0x110
[] ? lock_sock_nested+0x66/0xa0
[] lock_acquire+0x8d/0xb0
[] ? l2cap_chan_timeout+0x3c/0xe0 [bluetooth]
[] lock_sock_nested+0x8a/0xa0
[] ? l2cap_chan_timeout+0x3c/0xe0 [bluetooth]
[] ? process_one_work+0x126/0x450
[] l2cap_chan_timeout+0x3c/0xe0 [bluetooth]
[] process_one_work+0x184/0x450
[] ? process_one_work+0x126/0x450
[] ? l2cap_security_cfm+0x4e0/0x4e0 [bluetooth]
[] worker_thread+0x15e/0x340
[] ? manage_workers+0x110/0x110
[] kthread+0x96/0xa0
[] kernel_thread_helper+0x4/0x10
[] ? retint_restore_args+0xe/0xe
[] ? __init_kthread_worker+0x70/0x70
[] ? gs_change+0xb/0xbSigned-off-by: Ulisses Furquim
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
The struct hci_proto and all related register/unregister and dispatching
code was removed. HCI core code now call directly the SCO and L2CAP
event functions.Signed-off-by: Ulisses Furquim
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Make code readable by removing magic numbers.
Signed-off-by: Andrei Emeltchenko
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
No local_bh_disable is needed there once we run everything in process
context. The same goes for the replacement of bh_lock_sock() by
lock_sock().Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan
22 Dec, 2011
1 commit
-
…wireless into for-davem
21 Dec, 2011
7 commits
-
The handling of SCO audio links and the L2CAP protocol are essential to
any system with Bluetooth thus are always compiled in from now on.Signed-off-by: Ulisses Furquim
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
The hci_task_lock mutex (previously a lock) was supposed to protect the
register/unregister of HCI protocols against RX/TX tasks. This will not
be needed anymore because SCO and L2CAP will always be compiled.Moreover, with the recent move of RX/TX to workqueues per device the
global hci_task_lock was causing starvation between different HCI
devices.Signed-off-by: Ulisses Furquim
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
It makes more sense this way, since info_timer is a timer using delayed
work API.Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
This one also needs to run in process context
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
It is the only place where it is used.
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Signed-off-by: Andrei Emeltchenko
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Signed-off-by: Andrei Emeltchenko
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan