]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Bluetooth: Run page scan updates through hdev->req_workqueue
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 16 Nov 2015 10:52:21 +0000 (12:52 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 9 Dec 2015 23:51:47 +0000 (00:51 +0100)
commit01b1cb87d37fb19cdaa5e7002416fdde156873d0
tree87fdc0ba8b3872cea7267fb3a3b3b7ed101ffbba
parentad2c8c73d29702c3193f739390f6661f9a4ecad9
Bluetooth: Run page scan updates through hdev->req_workqueue

Since Add/Remove Device perform the page scan updates independently
from the HCI command completion we've introduced a potential race when
multiple mgmt commands are queued. Doing the page scan updates through
the req_workqueue ensures that the state changes are performed in a
race-free manner.

At the same time, to make the request helper more widely usable,
extend it to also cover Inquiry Scan changes since those are behind
the same HCI command. This is also reflected in the new name of the
API as well as the work struct name.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_event.c
net/bluetooth/hci_request.c
net/bluetooth/hci_request.h
net/bluetooth/mgmt.c