Skip to content

Commit

Permalink
Bluetooth: Replace BT_DBG with bt_dev_dbg for security manager support
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
  • Loading branch information
holtmann committed May 11, 2020
1 parent d5cc662 commit 5686024
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/bluetooth/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5686024

Please sign in to comment.