提交 1225a6bd 编写于 作者: J Johan Hedberg 提交者: Gustavo Padovan

Bluetooth: Fix unnecessary EIR update during powering on

When powered on the EIR data gets updated as the last step by mgmt.
Therefore avoid an update when getting a local name update as that's
part of the normal HCI init sequence.
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
Acked-by: NMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
上级 6b4b73ee
......@@ -3516,7 +3516,12 @@ int mgmt_set_local_name_complete(struct hci_dev *hdev, u8 *name, u8 status)
err = mgmt_event(MGMT_EV_LOCAL_NAME_CHANGED, hdev, &ev,
sizeof(ev), cmd ? cmd->sk : NULL);
update_eir(hdev);
/* EIR is taken care of separately when powering on the
* adapter so only update them here if this is a name change
* unrelated to power on.
*/
if (!test_bit(HCI_INIT, &hdev->flags))
update_eir(hdev);
failed:
if (cmd)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册