Skip to content

Commit

Permalink
Bluetooth: Fix clearing of persistent dev_flags
Browse files Browse the repository at this point in the history
Now that most flags are persistent, only the LE_SCAN flag should be
cleared after a reset.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Johan Hedberg committed Feb 21, 2012
1 parent 0224d2f commit a297e97
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,8 @@ static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb)

hci_req_complete(hdev, HCI_OP_RESET, status);

/* Reset all flags, except persistent ones */
hdev->dev_flags &= BIT(HCI_MGMT) | BIT(HCI_SETUP) | BIT(HCI_AUTO_OFF) |
BIT(HCI_LINK_KEYS) | BIT(HCI_DEBUG_KEYS);
/* Reset all non-persistent flags */
hdev->dev_flags &= ~(BIT(HCI_LE_SCAN));
}

static void hci_cc_write_local_name(struct hci_dev *hdev, struct sk_buff *skb)
Expand Down

0 comments on commit a297e97

Please sign in to comment.