return err;
}
-static int discovery(struct hci_dev *hdev)
-{
- int err;
-
- if (lmp_host_le_capable(hdev)) {
- if (lmp_bredr_capable(hdev)) {
- err = hci_le_scan(hdev, LE_SCAN_TYPE,
- LE_SCAN_INT, LE_SCAN_WIN,
- LE_SCAN_TIMEOUT_BREDR_LE);
- } else {
- hdev->discovery.type = DISCOV_TYPE_LE;
- err = hci_le_scan(hdev, LE_SCAN_TYPE,
- LE_SCAN_INT, LE_SCAN_WIN,
- LE_SCAN_TIMEOUT_LE_ONLY);
- }
- } else {
- hdev->discovery.type = DISCOV_TYPE_BREDR;
- err = hci_do_inquiry(hdev, INQUIRY_LEN_BREDR);
- }
-
- return err;
-}
-
int mgmt_interleaved_discovery(struct hci_dev *hdev)
{
int err;
break;
case DISCOV_TYPE_INTERLEAVED:
- err = discovery(hdev);
+ if (lmp_host_le_capable(hdev) && lmp_bredr_capable(hdev))
+ err = hci_le_scan(hdev, LE_SCAN_TYPE, LE_SCAN_INT,
+ LE_SCAN_WIN, LE_SCAN_TIMEOUT_BREDR_LE);
+ else
+ err = -ENOTSUPP;
break;
default: