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>
This commit is contained in:
Andre Guedes 2013-04-30 15:29:36 -03:00 committed by Gustavo Padovan
parent 1183fdcad4
commit 3fd319b830

View File

@ -949,18 +949,15 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,
if (!cp) if (!cp)
return; return;
if (status)
return;
switch (cp->enable) { switch (cp->enable) {
case LE_SCAN_ENABLE: case LE_SCAN_ENABLE:
if (status)
return;
set_bit(HCI_LE_SCAN, &hdev->dev_flags); set_bit(HCI_LE_SCAN, &hdev->dev_flags);
break; break;
case LE_SCAN_DISABLE: case LE_SCAN_DISABLE:
if (status)
return;
clear_bit(HCI_LE_SCAN, &hdev->dev_flags); clear_bit(HCI_LE_SCAN, &hdev->dev_flags);
break; break;