Blob Blame History Raw
From 568602457c1ab6d26db828de168e4ef35b88f1bc Mon Sep 17 00:00:00 2001
From: Marcel Holtmann <marcel@holtmann.org>
Date: Wed, 6 May 2020 09:57:50 +0200
Subject: [PATCH] Bluetooth: Replace BT_DBG with bt_dev_dbg for security manager support
Git-commit: 568602457c1ab6d26db828de168e4ef35b88f1bc
Patch-mainline: v5.8-rc1
References: jsc#SLE-13430

The security manager operates on a specific controller and thus use
bt_dev_dbg to indetify the controller for each debug message.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 net/bluetooth/smp.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -516,7 +516,7 @@ bool smp_irk_matches(struct hci_dev *hde
 
 	smp = chan->data;
 
-	BT_DBG("RPA %pMR IRK %*phN", bdaddr, 16, irk);
+	bt_dev_dbg(hdev, "RPA %pMR IRK %*phN", bdaddr, 16, irk);
 
 	err = smp_ah(smp->tfm_aes, irk, &bdaddr->b[3], hash);
 	if (err)
@@ -545,7 +545,7 @@ int smp_generate_rpa(struct hci_dev *hde
 	if (err < 0)
 		return err;
 
-	BT_DBG("RPA %pMR", rpa);
+	bt_dev_dbg(hdev, "RPA %pMR", rpa);
 
 	return 0;
 }
@@ -562,7 +562,7 @@ int smp_generate_oob(struct hci_dev *hde
 	smp = chan->data;
 
 	if (hci_dev_test_flag(hdev, HCI_USE_DEBUG_KEYS)) {
-		BT_DBG("Using debug keys");
+		bt_dev_dbg(hdev, "Using debug keys");
 		err = set_ecdh_privkey(smp->tfm_ecdh, debug_sk);
 		if (err)
 			return err;
@@ -1890,7 +1890,7 @@ static u8 sc_send_public_key(struct smp_
 {
 	struct hci_dev *hdev = smp->conn->hcon->hdev;
 
-	BT_DBG("");
+	bt_dev_dbg(hdev, "");
 
 	if (test_bit(SMP_FLAG_LOCAL_OOB, &smp->flags)) {
 		struct l2cap_chan *chan = hdev->smp_data;