Bluetooth: Fix EIR data clearing when powering off
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 22 Feb 2012 16:11:53 +0000 (18:11 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 23 Feb 2012 11:06:59 +0000 (13:06 +0200)
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>
net/bluetooth/hci_core.c

index e1dadee..2d75ffb 100644 (file)
@@ -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);