summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/smp.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-08-07 09:03:31 +0200
committerMarcel Holtmann <marcel@holtmann.org>2014-08-14 08:49:10 +0200
commit5fcb93475697911eb239f68241903eb5540803ac (patch)
treef520ce8d5d6b62148a7a9e946b2e2e45e99c009a /net/bluetooth/smp.c
parentBluetooth: Disable page scan if all whitelisted devices are connected (diff)
downloadlinux-5fcb93475697911eb239f68241903eb5540803ac.tar.xz
linux-5fcb93475697911eb239f68241903eb5540803ac.zip
Bluetooth: Remove redundant check for remote_key_dist
In the smp_cmd_sign_info() function the SMP_DIST_SIGN bit is explicitly cleared early on in the function. This means that there's no need to check for it again before calling smp_distribute_keys(). 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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index fd3294300803..40db728f044b 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -1168,8 +1168,7 @@ static int smp_cmd_sign_info(struct l2cap_conn *conn, struct sk_buff *skb)
memcpy(csrk->val, rp->csrk, sizeof(csrk->val));
}
smp->csrk = csrk;
- if (!(smp->remote_key_dist & SMP_DIST_SIGN))
- smp_distribute_keys(conn);
+ smp_distribute_keys(conn);
hci_dev_unlock(hdev);
return 0;