diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-01-30 19:39:58 -0800 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-02-13 09:51:40 +0200 |
commit | 21b93b75ad1090dd9aed69b56292648bac6666a9 (patch) | |
tree | c6a301ed837b268d6f358f4918ecb99c1b33093f /net/bluetooth/hci_core.c | |
parent | f813f1be1f82a09720e94533f46ac79276eb037d (diff) | |
download | linux-21b93b75ad1090dd9aed69b56292648bac6666a9.tar.bz2 |
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: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r-- | net/bluetooth/hci_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 8094a41c9a26..754a59079de9 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -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; |