Skip to contentSkip to conversation

Bluetooth: Remove redundant check for ACL_LINK

PATCH In review Johan Hedberg 2 participants 2 messages Jun 12, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: Remove redundant check for ACL_LINK

From: Johan Hedberg <[email protected]>

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.

---
 net/bluetooth/hci_event.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/bluetooth/hci_event.c +1 -2
index 88c57b12a222..32363c2b7f83 100644
@@ -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;
Signature · 1 line
2.4.3
maintainer
#1 lore raw

Hi Johan,

Quoted 8 lines

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.

---
net/bluetooth/hci_event.c | 3 +--

1 file changed, 1 insertion(+), 2 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel