瀏覽代碼

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>
Johan Hedberg 13 年之前
父節點
當前提交
e59fda8dc1
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      net/bluetooth/hci_core.c

+ 2 - 0
net/bluetooth/hci_core.c

@@ -794,6 +794,8 @@ static int hci_dev_do_close(struct hci_dev *hdev)
 	/* Clear flags */
 	/* Clear flags */
 	hdev->flags = 0;
 	hdev->flags = 0;
 
 
+	memset(hdev->eir, 0, sizeof(hdev->eir));
+
 	hci_req_unlock(hdev);
 	hci_req_unlock(hdev);
 
 
 	hci_dev_put(hdev);
 	hci_dev_put(hdev);