diff options
| author | Andre Guedes <andre.guedes@openbossa.org> | 2013-04-30 14:29:34 -0400 |
|---|---|---|
| committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-06-22 19:23:51 -0400 |
| commit | 82f4785ca7b8d04ca6d0aaa37f1185c779744bc4 (patch) | |
| tree | f15bbef2da50db226a405fc72db89fe0d346ea4d | |
| parent | 0e05bba6f6f8c2dca7a13fe0566742277e92df07 (diff) | |
Bluetooth: Remove stop discovery handling from hci_event.c
Since all mgmt stop discovery command complete events are now handled
in stop_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.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index faaf1f31345d..27f66dc88c9b 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
| @@ -40,21 +40,13 @@ static void hci_cc_inquiry_cancel(struct hci_dev *hdev, struct sk_buff *skb) | |||
| 40 | 40 | ||
| 41 | BT_DBG("%s status 0x%2.2x", hdev->name, status); | 41 | BT_DBG("%s status 0x%2.2x", hdev->name, status); |
| 42 | 42 | ||
| 43 | if (status) { | 43 | if (status) |
| 44 | hci_dev_lock(hdev); | ||
| 45 | mgmt_stop_discovery_failed(hdev, status); | ||
| 46 | hci_dev_unlock(hdev); | ||
| 47 | return; | 44 | return; |
| 48 | } | ||
| 49 | 45 | ||
| 50 | clear_bit(HCI_INQUIRY, &hdev->flags); | 46 | clear_bit(HCI_INQUIRY, &hdev->flags); |
| 51 | smp_mb__after_clear_bit(); /* wake_up_bit advises about this barrier */ | 47 | smp_mb__after_clear_bit(); /* wake_up_bit advises about this barrier */ |
| 52 | wake_up_bit(&hdev->flags, HCI_INQUIRY); | 48 | wake_up_bit(&hdev->flags, HCI_INQUIRY); |
| 53 | 49 | ||
| 54 | hci_dev_lock(hdev); | ||
| 55 | hci_discovery_set_state(hdev, DISCOVERY_STOPPED); | ||
| 56 | hci_dev_unlock(hdev); | ||
| 57 | |||
| 58 | hci_conn_check_pending(hdev); | 50 | hci_conn_check_pending(hdev); |
| 59 | } | 51 | } |
| 60 | 52 | ||
| @@ -966,12 +958,8 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev, | |||
| 966 | break; | 958 | break; |
| 967 | 959 | ||
| 968 | case LE_SCAN_DISABLE: | 960 | case LE_SCAN_DISABLE: |
| 969 | if (status) { | 961 | if (status) |
| 970 | hci_dev_lock(hdev); | ||
| 971 | mgmt_stop_discovery_failed(hdev, status); | ||
| 972 | hci_dev_unlock(hdev); | ||
| 973 | return; | 962 | return; |
| 974 | } | ||
| 975 | 963 | ||
| 976 | clear_bit(HCI_LE_SCAN, &hdev->dev_flags); | 964 | clear_bit(HCI_LE_SCAN, &hdev->dev_flags); |
| 977 | break; | 965 | break; |
