This patch adds to struct discovery_state the field 'type' so that
we can track the discovery type the device is performing.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
};
struct discovery_state {
+ int type;
enum {
DISCOVERY_STOPPED,
DISCOVERY_STARTING,
switch (state) {
case DISCOVERY_STOPPED:
+ hdev->discovery.type = 0;
+
if (hdev->discovery.state != DISCOVERY_STARTING)
mgmt_discovering(hdev, 0);
break;
goto failed;
}
- switch (cp->type) {
+ hdev->discovery.type = cp->type;
+
+ switch (hdev->discovery.type) {
case DISCOV_TYPE_BREDR:
case DISCOV_TYPE_INTERLEAVED:
err = hci_do_inquiry(hdev, INQUIRY_LEN_BREDR);