aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2013-04-30 14:29:29 -0400
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2013-06-22 19:23:50 -0400
commitfef5234a791507a2fe1ccfc85f080523fe762320 (patch)
tree63c9d04a4ee4eafd0ea518a278d6839cd7cd5e8c
parent7c3077207c705d0aa200ce22d49a0376d194dfca (diff)
Bluetooth: Remove start discovery handling from hci_event.c
Since all mgmt start discovery command complete events are now handled in start_discovery_complete callback in mgmt.c, we can remove this handling from hci_event.c. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Acked-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
-rw-r--r--net/bluetooth/hci_event.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index b93cd2eb5d58..0e71e6c47391 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -943,12 +943,6 @@ static void hci_cc_le_set_scan_param(struct hci_dev *hdev, struct sk_buff *skb)
943 943
944 BT_DBG("%s status 0x%2.2x", hdev->name, status); 944 BT_DBG("%s status 0x%2.2x", hdev->name, status);
945 945
946 if (status) {
947 hci_dev_lock(hdev);
948 mgmt_start_discovery_failed(hdev, status);
949 hci_dev_unlock(hdev);
950 return;
951 }
952} 946}
953 947
954static void hci_cc_le_set_scan_enable(struct hci_dev *hdev, 948static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,
@@ -965,18 +959,10 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,
965 959
966 switch (cp->enable) { 960 switch (cp->enable) {
967 case LE_SCAN_ENABLE: 961 case LE_SCAN_ENABLE:
968 if (status) { 962 if (status)
969 hci_dev_lock(hdev);
970 mgmt_start_discovery_failed(hdev, status);
971 hci_dev_unlock(hdev);
972 return; 963 return;
973 }
974 964
975 set_bit(HCI_LE_SCAN, &hdev->dev_flags); 965 set_bit(HCI_LE_SCAN, &hdev->dev_flags);
976
977 hci_dev_lock(hdev);
978 hci_discovery_set_state(hdev, DISCOVERY_FINDING);
979 hci_dev_unlock(hdev);
980 break; 966 break;
981 967
982 case LE_SCAN_DISABLE: 968 case LE_SCAN_DISABLE:
@@ -1077,18 +1063,10 @@ static void hci_cs_inquiry(struct hci_dev *hdev, __u8 status)
1077 1063
1078 if (status) { 1064 if (status) {
1079 hci_conn_check_pending(hdev); 1065 hci_conn_check_pending(hdev);
1080 hci_dev_lock(hdev);
1081 if (test_bit(HCI_MGMT, &hdev->dev_flags))
1082 mgmt_start_discovery_failed(hdev, status);
1083 hci_dev_unlock(hdev);
1084 return; 1066 return;
1085 } 1067 }
1086 1068
1087 set_bit(HCI_INQUIRY, &hdev->flags); 1069 set_bit(HCI_INQUIRY, &hdev->flags);
1088
1089 hci_dev_lock(hdev);
1090 hci_discovery_set_state(hdev, DISCOVERY_FINDING);
1091 hci_dev_unlock(hdev);
1092} 1070}
1093 1071
1094static void hci_cs_create_conn(struct hci_dev *hdev, __u8 status) 1072static void hci_cs_create_conn(struct hci_dev *hdev, __u8 status)