diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-22 11:11:53 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-23 06:06:59 -0500 |
commit | e59fda8dc14c173b74b5e9d5c8d72849d2ff6b5f (patch) | |
tree | fea7601af5badce381b0de38240e85868e766def /net | |
parent | 06199cf86a84206cfdc96b8dc02d5c27efa8c60f (diff) |
Bluetooth: Fix EIR data clearing when powering off
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index e1dadeea4c2f..2d75ffb42f7d 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -794,6 +794,8 @@ static int hci_dev_do_close(struct hci_dev *hdev) | |||
794 | /* Clear flags */ | 794 | /* Clear flags */ |
795 | hdev->flags = 0; | 795 | hdev->flags = 0; |
796 | 796 | ||
797 | memset(hdev->eir, 0, sizeof(hdev->eir)); | ||
798 | |||
797 | hci_req_unlock(hdev); | 799 | hci_req_unlock(hdev); |
798 | 800 | ||
799 | hci_dev_put(hdev); | 801 | hci_dev_put(hdev); |