summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/net/bluetooth/hci.h1
-rw-r--r--net/bluetooth/mgmt.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 51c9df16e764..469f8fdb2f5d 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -79,6 +79,7 @@ enum {
HCI_SETUP,
HCI_AUTO_OFF,
+ HCI_MGMT,
};
/* HCI ioctl defines */
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index dbb1e5776644..5f871b385a27 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -142,6 +142,8 @@ static int read_index_list(struct sock *sk)
hci_del_off_timer(d);
+ set_bit(HCI_MGMT, &d->flags);
+
if (test_bit(HCI_SETUP, &d->flags))
continue;
@@ -200,6 +202,8 @@ static int read_controller_info(struct sock *sk, unsigned char *data, u16 len)
hci_dev_lock_bh(hdev);
+ set_bit(HCI_MGMT, &hdev->flags);
+
put_unaligned_le16(hdev->id, &rp->index);
rp->type = hdev->dev_type;