Bluetooth: Use {start,stop}_discovery_complete handler for cmd_complete
authorMarcel Holtmann <marcel@holtmann.org>
Thu, 4 Dec 2014 10:36:35 +0000 (11:36 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 4 Dec 2014 10:50:34 +0000 (12:50 +0200)
commit11e6e25d052478235a0c3f94d2f2faddeb58eb96
tree2b0b7a206638756656c0870f244fc1d69d294be6
parentf5a969f23bc32945b0ec4bdb8084f514a5311142
Bluetooth: Use {start,stop}_discovery_complete handler for cmd_complete

Sending the required cmd_complete for the management commands should be
done in one place and not in multiple places. Especially for Start and
Stop Discovery commands this is split into to sending it in case of
failure from the complete handler, but in case of success from the
event state update function triggering mgmt_discovering. This is way
too convoluted and since hci_request serializes the HCI command
processing, send the cmd_complete response from the complete handler
for all cases.

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