]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Pass full hci_dev struct to mgmt callbacks
authorJohan Hedberg <johan.hedberg@intel.com>
Tue, 8 Nov 2011 18:40:14 +0000 (20:40 +0200)
committerGustavo F. Padovan <padovan@profusion.mobi>
Wed, 9 Nov 2011 14:33:26 +0000 (12:33 -0200)
commit1ed64a362970934bf7accde4bfde5bfa95580406
treea8c06c43be956e5db8db1bc1e052b773626892c6
parent8db0d4534221aca61a55f3710dab01840e378593
Bluetooth: Pass full hci_dev struct to mgmt callbacks

The current global pending command list in mgmt.c is racy. Possibly the
simplest way to fix it is to have per-hci dev lists instead of a global
one (all commands that need a pending struct are hci_dev specific).
This way the list can be protected using the already existing per-hci
dev lock. To enable this refactoring the first thing that needs to be
done is to ensure that the mgmt functions have access to the hci_dev
struct (instead of just the dev id).

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_core.c
net/bluetooth/hci_event.c
net/bluetooth/mgmt.c