Skip to contentSkip to conversation

Bluetooth: Remove check for valid LTK authenticated parameter

PATCH In review Marcel Holtmann 2 participants 2 messages Feb 1, 2014 – Feb 2, 2014

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/3 Bluetooth: Remove check for valid LTK authenticated parameter

The LTK authenticated parameter is the key type of the LTK and similar to link keys there is no need to check the currently supported values.

For possible future improvements, the kernel will only use key types it knows about and just ignore all the other ones.

---
 net/bluetooth/mgmt.c | 2 --
 1 file changed, 2 deletions(-)
net/bluetooth/mgmt.c +0 -2
index 70a3a7e917b7..8030eeb44382 100644
@@ -4146,8 +4146,6 @@ unlock:
 
 static bool ltk_is_valid(struct mgmt_ltk_info *key)
 {
-	if (key->authenticated != 0x00 && key->authenticated != 0x01)
-		return false;
 	if (key->master != 0x00 && key->master != 0x01)
 		return false;
 	if (!bdaddr_type_is_le(key->addr.type))
Signature · 1 line
1.8.5.3
#1 lore raw

Hi Marcel,

Quoted 10 lines · Marcel Holtmann

The LTK authenticated parameter is the key type of the LTK and similar to link keys there is no need to check the currently supported values.

For possible future improvements, the kernel will only use key types it knows about and just ignore all the other ones.

---
 net/bluetooth/mgmt.c | 2 --
 1 file changed, 2 deletions(-)

All three patches in this set have been applied to bluetooth-next. Thanks.

Johan