Skip to content

Commit

Permalink
Bluetooth: Fix EIR data clearing when powering off
Browse files Browse the repository at this point in the history
When powering off we should assume that the EIR data isn't valid
anymore. This patch makes sure it gets cleared in hci_dev_do_close and
thereby ensures that a correct new EIR is recreated when powering on
again.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Johan Hedberg committed Feb 23, 2012
1 parent 06199cf commit e59fda8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,8 @@ static int hci_dev_do_close(struct hci_dev *hdev)
/* Clear flags */
hdev->flags = 0;

memset(hdev->eir, 0, sizeof(hdev->eir));

hci_req_unlock(hdev);

hci_dev_put(hdev);
Expand Down

0 comments on commit e59fda8

Please sign in to comment.