瀏覽代碼

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>
Johan Hedberg 11 年之前
父節點
當前提交
5fcb934756
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      net/bluetooth/smp.c

+ 1 - 2
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));
 		memcpy(csrk->val, rp->csrk, sizeof(csrk->val));
 	}
 	}
 	smp->csrk = csrk;
 	smp->csrk = csrk;
-	if (!(smp->remote_key_dist & SMP_DIST_SIGN))
-		smp_distribute_keys(conn);
+	smp_distribute_keys(conn);
 	hci_dev_unlock(hdev);
 	hci_dev_unlock(hdev);
 
 
 	return 0;
 	return 0;