aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-07-01 12:14:12 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-07-03 11:42:54 -0400
commitfe59a05f941dbeb14316449be42d059761bed62c (patch)
treea89a79a5c2e2fe8ef0f2aad0cb84d38baa0b9c87 /net/bluetooth/hci_event.c
parent854f47278fb36f4904649b994acf559e13920232 (diff)
Bluetooth: Add flag to track STK encryption
There are certain subtle differences in behavior when we're encrypted with the STK, such as allowing re-encryption even though the security level stays the same. Because of this, add a flag to track whether we're encrypted with an STK or not. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 8097559ebb48..b0b760dd66a3 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -4365,8 +4365,11 @@ static void hci_le_ltk_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
4365 * using a distributed LTK. 4365 * using a distributed LTK.
4366 */ 4366 */
4367 if (ltk->type == SMP_STK) { 4367 if (ltk->type == SMP_STK) {
4368 set_bit(HCI_CONN_STK_ENCRYPT, &conn->flags);
4368 list_del(&ltk->list); 4369 list_del(&ltk->list);
4369 kfree(ltk); 4370 kfree(ltk);
4371 } else {
4372 clear_bit(HCI_CONN_STK_ENCRYPT, &conn->flags);
4370 } 4373 }
4371 4374
4372 hci_dev_unlock(hdev); 4375 hci_dev_unlock(hdev);