]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix smp_e byte order to be consistent with SMP specification
authorJohan Hedberg <johan.hedberg@intel.com>
Tue, 18 Mar 2014 10:58:24 +0000 (12:58 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 18 Mar 2014 17:18:26 +0000 (10:18 -0700)
commit08dc705d5a9e6af75b88c8598d2d7d2fd1094baf
tree95bf7d7bf65aa96712ffb830a951b7cdfa8f711f
parent8f0e21d30d7d64951a65c65d96da13c6069607cf
Bluetooth: Fix smp_e byte order to be consistent with SMP specification

The SMP specification is written with the assumption that both key
information, plaintextData and encryptedData follow the same little
endian byte ordering as the rest of SMP.

Since the kernel crypto routines expect big endian data the code has had
to do various byte swapping tricks to make the behavior as expected,
however the swapping has been scattered all around the place.

This patch centralizes the byte order swapping into the smp_e function
by making its public interface match what the other SMP functions expect
as per specification. The benefit is vastly simplified calls to smp_e.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/smp.c