summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2010-12-29 16:00:25 +0200
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-08 01:40:04 -0200
commit73f22f62388795c0f6b4f3f97bda7a64f9681aac (patch)
tree5e85471cd9411a9f21cd2f7bb722be196a23f7c7 /net/bluetooth/hci_event.c
parenteec8d2bcc841ae44edcde9660ff21144a2016053 (diff)
downloadop-kernel-dev-73f22f62388795c0f6b4f3f97bda7a64f9681aac.zip
op-kernel-dev-73f22f62388795c0f6b4f3f97bda7a64f9681aac.tar.gz
Bluetooth: Add support for set_discoverable management command
This patch adds a set_discoverable command to the management interface as well as the corresponding event. The command is used to control the discoverable state of adapters. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index d42fb35..f55004a 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -278,8 +278,11 @@ static void hci_cc_write_scan_enable(struct hci_dev *hdev, struct sk_buff *skb)
clear_bit(HCI_PSCAN, &hdev->flags);
clear_bit(HCI_ISCAN, &hdev->flags);
- if (param & SCAN_INQUIRY)
+ if (param & SCAN_INQUIRY) {
set_bit(HCI_ISCAN, &hdev->flags);
+ mgmt_discoverable(hdev->id, 1);
+ } else
+ mgmt_discoverable(hdev->id, 0);
if (param & SCAN_PAGE)
set_bit(HCI_PSCAN, &hdev->flags);
OpenPOWER on IntegriCloud