Bluetooth: Fix clearing HCI_PSCAN flag
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 28 Jul 2014 12:45:31 +0000 (15:45 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 28 Jul 2014 14:50:52 +0000 (16:50 +0200)
This patch fixes a typo in the hci_cc_write_scan_enable() function where
we want to clear the HCI_PSCAN flag if the SCAN_PAGE bit of the HCI
command parameter was not set.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_event.c

index ba26fbfe481a8839df4ea251c7dc98798fdcbd24..623501ddd1b8abf712f72472cf41260907a3052d 100644 (file)
@@ -317,7 +317,7 @@ static void hci_cc_write_scan_enable(struct hci_dev *hdev, struct sk_buff *skb)
        if (param & SCAN_PAGE)
                set_bit(HCI_PSCAN, &hdev->flags);
        else
-               clear_bit(HCI_ISCAN, &hdev->flags);
+               clear_bit(HCI_PSCAN, &hdev->flags);
 
 done:
        hci_dev_unlock(hdev);