Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1225a6bd authored by Johan Hedberg's avatar Johan Hedberg Committed by Gustavo Padovan
Browse files

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: default avatarJohan Hedberg <johan.hedberg@intel.com>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent 6b4b73ee
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -3516,6 +3516,11 @@ 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);

	/* 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: