Bluetooth: Update start_discovery to use HCI request
authorAndre Guedes <andre.guedes@openbossa.org>
Tue, 30 Apr 2013 18:29:28 +0000 (15:29 -0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Sat, 22 Jun 2013 23:23:50 +0000 (00:23 +0100)
commit7c3077207c705d0aa200ce22d49a0376d194dfca
tree8cffd67294a35abac0a2576f7dac6dd773ed47e4
parent1f9b9a5dc5bb8ee360db9d32b2090aac497ae82a
Bluetooth: Update start_discovery to use HCI request

This patch modifies the start_discovery function so it uses the HCI
request framework.

We build the HCI request according to the discovery type (add inquiry
or LE scan HCI commands) and run the HCI request. We also register
the start_discovery_complete callback which handles mgmt command
complete events for this command. This way, we move all start_
discovery mgmt handling code spread in hci_event.c to a single place
in mgmt.c.

This patch also merges the LE-only and interleaved discovery type
cases since these cases are pretty much the same now.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/mgmt.c