aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-03-16 15:34:57 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2015-03-16 15:36:23 -0400
commitfb334fee60ebd1aea23cc5daf3abac10139c9a24 (patch)
tree2c74a63011d7311c12744ebeb8f7d9d509cbd7aa /net/bluetooth
parentbc07cd696e1863d082fdc8650351b288bd41629b (diff)
Bluetooth: Rename smp->local_rr into smp->local_rand
The variable for the out-of-band random number was badly named and with that confusing. Just rename it to local_rand so it is clear what value it represents. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/smp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index ebe69e91fb6c..60180b47ce71 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -78,7 +78,7 @@ struct smp_dev {
78 /* Secure Connections OOB data */ 78 /* Secure Connections OOB data */
79 u8 local_pk[64]; 79 u8 local_pk[64];
80 u8 local_sk[32]; 80 u8 local_sk[32];
81 u8 local_rr[16]; 81 u8 local_rand[16];
82 bool debug_key; 82 bool debug_key;
83 83
84 struct crypto_blkcipher *tfm_aes; 84 struct crypto_blkcipher *tfm_aes;
@@ -569,14 +569,14 @@ int smp_generate_oob(struct hci_dev *hdev, u8 hash[16], u8 rand[16])
569 SMP_DBG("OOB Public Key Y: %32phN", smp->local_pk + 32); 569 SMP_DBG("OOB Public Key Y: %32phN", smp->local_pk + 32);
570 SMP_DBG("OOB Private Key: %32phN", smp->local_sk); 570 SMP_DBG("OOB Private Key: %32phN", smp->local_sk);
571 571
572 get_random_bytes(smp->local_rr, 16); 572 get_random_bytes(smp->local_rand, 16);
573 573
574 err = smp_f4(smp->tfm_cmac, smp->local_pk, smp->local_pk, 574 err = smp_f4(smp->tfm_cmac, smp->local_pk, smp->local_pk,
575 smp->local_rr, 0, hash); 575 smp->local_rand, 0, hash);
576 if (err < 0) 576 if (err < 0)
577 return err; 577 return err;
578 578
579 memcpy(rand, smp->local_rr, 16); 579 memcpy(rand, smp->local_rand, 16);
580 580
581 return 0; 581 return 0;
582} 582}
@@ -1841,7 +1841,7 @@ static u8 sc_send_public_key(struct smp_chan *smp)
1841 1841
1842 memcpy(smp->local_pk, smp_dev->local_pk, 64); 1842 memcpy(smp->local_pk, smp_dev->local_pk, 64);
1843 memcpy(smp->local_sk, smp_dev->local_sk, 32); 1843 memcpy(smp->local_sk, smp_dev->local_sk, 32);
1844 memcpy(smp->lr, smp_dev->local_rr, 16); 1844 memcpy(smp->lr, smp_dev->local_rand, 16);
1845 1845
1846 if (smp_dev->debug_key) 1846 if (smp_dev->debug_key)
1847 set_bit(SMP_FLAG_DEBUG_KEY, &smp->flags); 1847 set_bit(SMP_FLAG_DEBUG_KEY, &smp->flags);