projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f813f1b
)
Bluetooth: Make LTK key type check more readable
author
Johan Hedberg
<johan.hedberg@intel.com>
Fri, 31 Jan 2014 03:39:58 +0000
(19:39 -0800)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Thu, 13 Feb 2014 07:51:40 +0000
(09:51 +0200)
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>
net/bluetooth/hci_core.c
patch
|
blob
|
blame
|
history
diff --git
a/net/bluetooth/hci_core.c
b/net/bluetooth/hci_core.c
index 8094a41c9a26c77c3ed52429aa596345d20f5918..754a59079de91c69b9802043a7f443f772b48c8c 100644
(file)
--- 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;