Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291076
b: refs/heads/master
c: 426c189
h: refs/heads/master
v: v3
  • Loading branch information
Andre Guedes authored and Johan Hedberg committed Feb 29, 2012
1 parent d688367 commit 0fb1345
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 978c93b90fc4768e295b20492b5db76d5e026e5e
refs/heads/master: 426c189a1b34c0d36d5eddbe1c35bc961b1a1b68
29 changes: 5 additions & 24 deletions trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2540,29 +2540,6 @@ static int remove_remote_oob_data(struct sock *sk, u16 index,
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;
Expand Down Expand Up @@ -2632,7 +2609,11 @@ static int start_discovery(struct sock *sk, u16 index,
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:
Expand Down

0 comments on commit 0fb1345

Please sign in to comment.