aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2013-04-30 14:29:36 -0400
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2013-06-22 19:23:51 -0400
commit3fd319b830247a3fe5f489e622ab404b618e0906 (patch)
tree8f5c6f78348107f61e0522b8d92729979335052d /net/bluetooth/hci_event.c
parent1183fdcad42495073045a2d9755e0a6ac2fa874e (diff)
Bluetooth: Refactor hci_cc_le_set_scan_enable
This patch does a trivial refactoring in hci_cc_le_set_scan_enable. Since start and stop discovery command failures are now handled in mgmt layer, the status check became empty. So, we can move it to outside the switch statement. 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>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 27f66dc88c9b..76ff1af05693 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -949,18 +949,15 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,
949 if (!cp) 949 if (!cp)
950 return; 950 return;
951 951
952 if (status)
953 return;
954
952 switch (cp->enable) { 955 switch (cp->enable) {
953 case LE_SCAN_ENABLE: 956 case LE_SCAN_ENABLE:
954 if (status)
955 return;
956
957 set_bit(HCI_LE_SCAN, &hdev->dev_flags); 957 set_bit(HCI_LE_SCAN, &hdev->dev_flags);
958 break; 958 break;
959 959
960 case LE_SCAN_DISABLE: 960 case LE_SCAN_DISABLE:
961 if (status)
962 return;
963
964 clear_bit(HCI_LE_SCAN, &hdev->dev_flags); 961 clear_bit(HCI_LE_SCAN, &hdev->dev_flags);
965 break; 962 break;
966 963