Bluetooth: Fix clearing of HCI_PENDING_CLASS flag
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 2 Mar 2012 01:06:04 +0000 (03:06 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 2 Mar 2012 01:19:24 +0000 (03:19 +0200)
When doing reset HCI_PENDING_CLASS is one of the flags that should be
cleared (since it's used for a pending HCI command and a reset clear all
pending commands).

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

index aee9556e10390bf389e00b1bc72b3215eab00e72..d6c41bbfe75900c31aa00a5307cb276a07f510d9 100644 (file)
@@ -193,7 +193,7 @@ static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb)
        hci_req_complete(hdev, HCI_OP_RESET, status);
 
        /* Reset all non-persistent flags */
-       hdev->dev_flags &= ~(BIT(HCI_LE_SCAN));
+       hdev->dev_flags &= ~(BIT(HCI_LE_SCAN) | BIT(HCI_PENDING_CLASS));
 
        hdev->discovery.state = DISCOVERY_STOPPED;
 }