linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v3 5/7] Bluetooth: Replace BT_DBG with bt_dev_dbg for security manager  support
Date: Wed,  6 May 2020 09:57:50 +0200	[thread overview]
Message-ID: <f55405684917adad79e9031df1bef804ed3245a2.1588751831.git.marcel@holtmann.org> (raw)
In-Reply-To: <32fc749671997c463575394666b2e003917355f5.1588751831.git.marcel@holtmann.org>

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>
---
 net/bluetooth/smp.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index df22cbf94693..5510017cf9ff 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -508,7 +508,7 @@ bool smp_irk_matches(struct hci_dev *hdev, const u8 irk[16],
 	if (!chan || !chan->data)
 		return false;
 
-	BT_DBG("RPA %pMR IRK %*phN", bdaddr, 16, irk);
+	bt_dev_dbg(hdev, "RPA %pMR IRK %*phN", bdaddr, 16, irk);
 
 	err = smp_ah(irk, &bdaddr->b[3], hash);
 	if (err)
@@ -534,7 +534,7 @@ int smp_generate_rpa(struct hci_dev *hdev, const u8 irk[16], bdaddr_t *rpa)
 	if (err < 0)
 		return err;
 
-	BT_DBG("RPA %pMR", rpa);
+	bt_dev_dbg(hdev, "RPA %pMR", rpa);
 
 	return 0;
 }
@@ -551,7 +551,7 @@ int smp_generate_oob(struct hci_dev *hdev, u8 hash[16], u8 rand[16])
 	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;
@@ -1867,7 +1867,7 @@ static u8 sc_send_public_key(struct smp_chan *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;
-- 
2.26.2


  reply	other threads:[~2020-05-06  7:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06  7:57 [PATCH v3 0/7] Patches introducing experimental feature support Marcel Holtmann
2020-05-06  7:57 ` [PATCH v3 1/7] Bluetooth: Add MGMT_EV_PHY_CONFIGURATION_CHANGED to supported list Marcel Holtmann
2020-05-06  7:57   ` [PATCH v3 2/7] Bluetooth: Replace BT_DBG with bt_dev_dbg for management support Marcel Holtmann
2020-05-06  7:57     ` [PATCH v3 3/7] Bluetooth: replace zero-length array with flexible-array member Marcel Holtmann
2020-05-06  7:57       ` [PATCH v3 4/7] Bluetooth: Introduce HCI_MGMT_HDEV_OPTIONAL option Marcel Holtmann
2020-05-06  7:57         ` Marcel Holtmann [this message]
2020-05-06  7:57           ` [PATCH v3 6/7] Bluetooth: Add support for experimental features configuration Marcel Holtmann
2020-05-06  7:57             ` [PATCH v3 7/7] Bluetooth: Introduce debug feature when dynamic debug is disabled Marcel Holtmann
2020-05-08 15:17               ` Alain Michaud
2020-05-08 15:15     ` [PATCH v3 2/7] Bluetooth: Replace BT_DBG with bt_dev_dbg for management support Alain Michaud
2020-05-08  8:59 ` [PATCH v3 0/7] Patches introducing experimental feature support Johan Hedberg
2020-05-08 15:19   ` Alain Michaud

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f55405684917adad79e9031df1bef804ed3245a2.1588751831.git.marcel@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).