summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/smp.c
diff options
context:
space:
mode:
authorJohan Hedberg2014-06-16 18:25:15 +0200
committerMarcel Holtmann2014-07-03 17:42:42 +0200
commit7d5843b7b77cee26bd5e090bfa61780d75957648 (patch)
tree0616eacae3385d5f37aabad9dab6079a1f39adef /net/bluetooth/smp.c
parentBluetooth: Fix missing NULL check for smp_chan_create() return value (diff)
downloadkernel-qcow2-linux-7d5843b7b77cee26bd5e090bfa61780d75957648.tar.gz
kernel-qcow2-linux-7d5843b7b77cee26bd5e090bfa61780d75957648.tar.xz
kernel-qcow2-linux-7d5843b7b77cee26bd5e090bfa61780d75957648.zip
Bluetooth: Remove unnecessary SMP STK define
We never store the "master" type of STKs since we request encryption directly with them so we only need one STK type (the one that's looked-up on the slave side). Simply remove the unnecessary define and rename the _SLAVE one to the shorter form. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/smp.c')
-rw-r--r--net/bluetooth/smp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 1f4ed1e78e10..b9cac1deb19f 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -568,8 +568,12 @@ static u8 smp_random(struct smp_chan *smp)
else
auth = 0;
+ /* Even though there's no _SLAVE suffix this is the
+ * slave STK we're adding for later lookup (the master
+ * STK never needs to be stored).
+ */
hci_add_ltk(hcon->hdev, &hcon->dst, hcon->dst_type,
- HCI_SMP_STK_SLAVE, auth, stk, smp->enc_key_size,
+ HCI_SMP_STK, auth, stk, smp->enc_key_size,
ediv, rand);
}