diff options
-rw-r--r-- | net/bluetooth/smp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 5003d224c4b6..e76c963011e5 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c | |||
@@ -1293,7 +1293,7 @@ static int smp_cmd_master_ident(struct l2cap_conn *conn, struct sk_buff *skb) | |||
1293 | authenticated, smp->tk, smp->enc_key_size, | 1293 | authenticated, smp->tk, smp->enc_key_size, |
1294 | rp->ediv, rp->rand); | 1294 | rp->ediv, rp->rand); |
1295 | smp->ltk = ltk; | 1295 | smp->ltk = ltk; |
1296 | if (!(smp->remote_key_dist & SMP_DIST_ID_KEY)) | 1296 | if (!(smp->remote_key_dist & KEY_DIST_MASK)) |
1297 | smp_distribute_keys(smp); | 1297 | smp_distribute_keys(smp); |
1298 | hci_dev_unlock(hdev); | 1298 | hci_dev_unlock(hdev); |
1299 | 1299 | ||
@@ -1371,7 +1371,8 @@ static int smp_cmd_ident_addr_info(struct l2cap_conn *conn, | |||
1371 | smp->id_addr_type, smp->irk, &rpa); | 1371 | smp->id_addr_type, smp->irk, &rpa); |
1372 | 1372 | ||
1373 | distribute: | 1373 | distribute: |
1374 | smp_distribute_keys(smp); | 1374 | if (!(smp->remote_key_dist & KEY_DIST_MASK)) |
1375 | smp_distribute_keys(smp); | ||
1375 | 1376 | ||
1376 | hci_dev_unlock(hcon->hdev); | 1377 | hci_dev_unlock(hcon->hdev); |
1377 | 1378 | ||