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

Commit 430a61b8 authored by Johan Hedberg's avatar Johan Hedberg Committed by Gustavo Padovan
Browse files

Bluetooth: Fix sending unnecessary HCI_LE_Host_Enable



This patch fixes sending an unnecessary HCI_LE_Host_Enable command if
the command has already been sent as part of the default HCI init
sequence.

Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent 1225a6bd
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -2926,7 +2926,13 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered)
			cp.le = 1;
			cp.simul = !!lmp_le_br_capable(hdev);

			hci_send_cmd(hdev, HCI_OP_WRITE_LE_HOST_SUPPORTED,
			/* Check first if we already have the right
			 * host state (host features set)
			 */
			if (cp.le != !!lmp_host_le_capable(hdev) ||
			    cp.simul != !!lmp_host_le_br_capable(hdev))
				hci_send_cmd(hdev,
					     HCI_OP_WRITE_LE_HOST_SUPPORTED,
					     sizeof(cp), &cp);
		}