Bluetooth: don't assume key size is 16 when the command fails
authorAlain Michaud <alainm@chromium.org>
Wed, 25 Mar 2020 14:48:34 +0000 (14:48 +0000)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 25 Mar 2020 14:50:35 +0000 (15:50 +0100)
commit32b50729d91f0b59336851bf765b9423add00710
tree6c14be997d596f4efc4813779407428686abe7ae
parentb48596d1dc257900b9639f61e1cfd95250e7381b
Bluetooth: don't assume key size is 16 when the command fails

With this change, the encryption key size is not assumed to be 16 if the
read_encryption_key_size command fails for any reason.  This ensures
that if the controller fails the command for any reason that the
encryption key size isn't implicitely set to 16 and instead take a more
concervative posture to assume it is 0.

Signed-off-by: Alain Michaud <alainm@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_event.c