From: Johan Hedberg Date: Fri, 12 Jun 2015 10:04:47 +0000 (+0300) Subject: Bluetooth: Remove redundant check for ACL_LINK X-Git-Tag: v4.9.8~4072^2~29^2~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d667ef6e01be22343b07a1f5d5a976962e3103e;p=platform%2Fkernel%2Flinux-rpi3.git 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 Signed-off-by: Marcel Holtmann --- 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;