aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2010-12-29 09:00:25 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-07 22:40:04 -0500
commit73f22f62388795c0f6b4f3f97bda7a64f9681aac (patch)
tree5e85471cd9411a9f21cd2f7bb722be196a23f7c7 /net/bluetooth/hci_event.c
parenteec8d2bcc841ae44edcde9660ff21144a2016053 (diff)
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 d42fb35309b5..f55004af0558 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)
278 clear_bit(HCI_PSCAN, &hdev->flags); 278 clear_bit(HCI_PSCAN, &hdev->flags);
279 clear_bit(HCI_ISCAN, &hdev->flags); 279 clear_bit(HCI_ISCAN, &hdev->flags);
280 280
281 if (param & SCAN_INQUIRY) 281 if (param & SCAN_INQUIRY) {
282 set_bit(HCI_ISCAN, &hdev->flags); 282 set_bit(HCI_ISCAN, &hdev->flags);
283 mgmt_discoverable(hdev->id, 1);
284 } else
285 mgmt_discoverable(hdev->id, 0);
283 286
284 if (param & SCAN_PAGE) 287 if (param & SCAN_PAGE)
285 set_bit(HCI_PSCAN, &hdev->flags); 288 set_bit(HCI_PSCAN, &hdev->flags);