diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2012-02-03 15:48:01 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-13 10:01:34 -0500 |
commit | 3fd2415363629b779549705f341e0645e32c1ad5 (patch) | |
tree | 4203df133dbbe7c65b7d4c1b0f63780c19afc276 /net/bluetooth/hci_event.c | |
parent | 28b75a89480df99a17c8facd5c33985847d06bb6 (diff) |
Bluetooth: MGMT start discovery LE-Only support
This patch adds LE-Only discovery procedure support to MGMT Start
Discovery command.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 97152d9d7116..ad5f37b13f77 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -1033,6 +1033,13 @@ static void hci_cc_le_set_scan_param(struct hci_dev *hdev, struct sk_buff *skb) | |||
1033 | BT_DBG("%s status 0x%x", hdev->name, status); | 1033 | BT_DBG("%s status 0x%x", hdev->name, status); |
1034 | 1034 | ||
1035 | hci_req_complete(hdev, HCI_OP_LE_SET_SCAN_PARAM, status); | 1035 | hci_req_complete(hdev, HCI_OP_LE_SET_SCAN_PARAM, status); |
1036 | |||
1037 | if (status) { | ||
1038 | hci_dev_lock(hdev); | ||
1039 | mgmt_start_discovery_failed(hdev, status); | ||
1040 | hci_dev_unlock(hdev); | ||
1041 | return; | ||
1042 | } | ||
1036 | } | 1043 | } |
1037 | 1044 | ||
1038 | static void hci_cc_le_set_scan_enable(struct hci_dev *hdev, | 1045 | static void hci_cc_le_set_scan_enable(struct hci_dev *hdev, |
@@ -1051,8 +1058,12 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev, | |||
1051 | case LE_SCANNING_ENABLED: | 1058 | case LE_SCANNING_ENABLED: |
1052 | hci_req_complete(hdev, HCI_OP_LE_SET_SCAN_ENABLE, status); | 1059 | hci_req_complete(hdev, HCI_OP_LE_SET_SCAN_ENABLE, status); |
1053 | 1060 | ||
1054 | if (status) | 1061 | if (status) { |
1062 | hci_dev_lock(hdev); | ||
1063 | mgmt_start_discovery_failed(hdev, status); | ||
1064 | hci_dev_unlock(hdev); | ||
1055 | return; | 1065 | return; |
1066 | } | ||
1056 | 1067 | ||
1057 | set_bit(HCI_LE_SCAN, &hdev->dev_flags); | 1068 | set_bit(HCI_LE_SCAN, &hdev->dev_flags); |
1058 | 1069 | ||