diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-01-14 19:46:27 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-01-14 19:46:27 +0200 |
commit | 4f9c2cb5e002a12713898b83c5f1ce8093630e27 (patch) | |
tree | b80ad8a1f2b60a5667bce8c64718a26776fafda2 /src/adapter.c | |
parent | b1781bac1d8281f17b4fe5436dc2ff6803a29276 (diff) |
Use hci_send_req instead of hci_send_cmd for write_scan_enable
Diffstat (limited to 'src/adapter.c')
-rw-r--r-- | src/adapter.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/adapter.c b/src/adapter.c index 387e33da..c4fa3212 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -425,8 +425,15 @@ static int set_mode(struct btd_adapter *adapter, uint8_t new_mode) } if (adapter->up && scan_enable == SCAN_DISABLED) { - hci_send_cmd(dd, OGF_HOST_CTL, OCF_WRITE_SCAN_ENABLE, 1, - &scan_enable); + struct hci_request rq = { + .ogf = OGF_HOST_CTL, + .ocf = OCF_WRITE_SCAN_ENABLE, + .cparam = &scan_enable, + .clen = sizeof(scan_enable), + }; + + hci_send_req(dd, &rq, HCI_REQ_TIMEOUT); + if (ioctl(dd, HCIDEVDOWN, adapter->dev_id) < 0) { err = -errno; hci_close_dev(dd); |