Bluetooth: Move Stop Discovery to req_workqueue
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 11 Nov 2015 06:30:45 +0000 (08:30 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 19 Nov 2015 16:50:31 +0000 (17:50 +0100)
commit2154d3f4fb83c812a161c4910948dd876997e111
tree0f9151acfc4bcf72165911bcc25713a08faf3a9b
parente68f072b7396574df5324e1cf93e4b0c92460735
Bluetooth: Move Stop Discovery to req_workqueue

Since discovery also deals with LE scanning it makes sense to move it
behind the same req_workqueue as other LE scanning changes. This also
simplifies the logic since we do many of the actions in a synchronous
manner.

Part of this refactoring is moving hci_req_stop_discovery() to
hci_request.c. At the same time the function receives support for
properly handling the STOPPING state since that's the state we'll be
in when stopping through the req_workqueue.

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_request.c
net/bluetooth/hci_request.h
net/bluetooth/mgmt.c