From: Andrei Emeltchenko Date: Mon, 12 Mar 2012 10:13:06 +0000 (+0200) Subject: Bluetooth: Correct ediv in SMP X-Git-Tag: upstream/snapshot3+hdmi~7329^2~3^2~18^2^2~106 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=58115373e74c7ee18d0f54f00831649a6471a899;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git Bluetooth: Correct ediv in SMP ediv is already in little endian order. Signed-off-by: Andrei Emeltchenko Acked-by: Marcel Holtmann Signed-off-by: Johan Hedberg --- diff --git a/include/net/bluetooth/smp.h b/include/net/bluetooth/smp.h index 7b3acdd..ca356a7 100644 --- a/include/net/bluetooth/smp.h +++ b/include/net/bluetooth/smp.h @@ -77,7 +77,7 @@ struct smp_cmd_encrypt_info { #define SMP_CMD_MASTER_IDENT 0x07 struct smp_cmd_master_ident { - __u16 ediv; + __le16 ediv; __u8 rand[8]; } __packed; diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index deb1198..6fc7c47 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -956,7 +956,7 @@ int smp_distribute_keys(struct l2cap_conn *conn, __u8 force) HCI_SMP_LTK_SLAVE, 1, authenticated, enc.ltk, smp->enc_key_size, ediv, ident.rand); - ident.ediv = cpu_to_le16(ediv); + ident.ediv = ediv; smp_send_cmd(conn, SMP_CMD_MASTER_IDENT, sizeof(ident), &ident);