summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2015-06-12 13:04:47 +0300
committerMarcel Holtmann <marcel@holtmann.org>2015-06-12 12:07:20 +0200
commit5d667ef6e01be22343b07a1f5d5a976962e3103e (patch)
treec59a89364182edfe41322ba2627697d7dc266533 /net/bluetooth/hci_event.c
parent70f36507d0c3277e4a5424ca0c6c2a002ae42768 (diff)
downloadop-kernel-dev-5d667ef6e01be22343b07a1f5d5a976962e3103e.zip
op-kernel-dev-5d667ef6e01be22343b07a1f5d5a976962e3103e.tar.gz
Bluetooth: Remove redundant check for ACL_LINK
The encryption key size is read only for BR/EDR (ACL_LINK) connections so there's no need to check for it in the read_enc_key_size_complete() callback. 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, 1 insertions, 2 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 88c57b1..32363c2 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2648,8 +2648,7 @@ static void read_enc_key_size_complete(struct hci_dev *hdev, u8 status,
if (!test_bit(HCI_CONN_ENCRYPT, &conn->flags))
encrypt = 0x00;
- else if (conn->type == ACL_LINK &&
- test_bit(HCI_CONN_AES_CCM, &conn->flags))
+ else if (test_bit(HCI_CONN_AES_CCM, &conn->flags))
encrypt = 0x02;
else
encrypt = 0x01;
OpenPOWER on IntegriCloud