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

Commit 21b93b75 authored by Johan Hedberg's avatar Johan Hedberg
Browse files

Bluetooth: Make LTK key type check more readable



Instead of magic bitwise operations simply compare with the two possible
type values that we are interested in.

Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent f813f1be
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2717,7 +2717,7 @@ int hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type, u8 type,
	if (!new_key)
		return 0;

	if (type & HCI_SMP_LTK)
	if (type == HCI_SMP_LTK || type == HCI_SMP_LTK_SLAVE)
		mgmt_new_ltk(hdev, key, 1);

	return 0;