summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-01-14 19:37:46 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2009-01-14 19:37:46 +0200
commitb1781bac1d8281f17b4fe5436dc2ff6803a29276 (patch)
tree1e24bd9c3a18f7ba91b8e3ccb56622e5eb7cea9b /src
parent050415383a3af8c991e555cd7f6e8944ed634e29 (diff)
Explicitly disable scans before powering adapter down
Diffstat (limited to 'src')
-rw-r--r--src/adapter.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/adapter.c b/src/adapter.c
index 8e340100..387e33da 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -425,6 +425,8 @@ 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);
if (ioctl(dd, HCIDEVDOWN, adapter->dev_id) < 0) {
err = -errno;
hci_close_dev(dd);