mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Bluetooth: Use bt_dev_err and bt_dev_info when possible
In case of using BT_ERR and BT_INFO, convert to bt_dev_err and bt_dev_info when possible. This allows for controller specific reporting. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
a9ee77af75
commit
2064ee332e
21 changed files with 279 additions and 280 deletions
|
@ -996,7 +996,8 @@ static u8 smp_random(struct smp_chan *smp)
|
|||
return SMP_UNSPECIFIED;
|
||||
|
||||
if (crypto_memneq(smp->pcnf, confirm, sizeof(smp->pcnf))) {
|
||||
BT_ERR("Pairing failed (confirmation values mismatch)");
|
||||
bt_dev_err(hcon->hdev, "pairing failed "
|
||||
"(confirmation values mismatch)");
|
||||
return SMP_CONFIRM_FAILED;
|
||||
}
|
||||
|
||||
|
@ -1210,7 +1211,7 @@ static void sc_generate_ltk(struct smp_chan *smp)
|
|||
|
||||
key = hci_find_link_key(hdev, &hcon->dst);
|
||||
if (!key) {
|
||||
BT_ERR("%s No Link Key found to generate LTK", hdev->name);
|
||||
bt_dev_err(hdev, "no Link Key found to generate LTK");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2067,11 +2068,11 @@ static int fixup_sc_false_positive(struct smp_chan *smp)
|
|||
return SMP_UNSPECIFIED;
|
||||
|
||||
if (hci_dev_test_flag(hdev, HCI_SC_ONLY)) {
|
||||
BT_ERR("Refusing SMP SC -> legacy fallback in SC-only mode");
|
||||
bt_dev_err(hdev, "refusing legacy fallback in SC-only mode");
|
||||
return SMP_UNSPECIFIED;
|
||||
}
|
||||
|
||||
BT_ERR("Trying to fall back to legacy SMP");
|
||||
bt_dev_err(hdev, "trying to fall back to legacy SMP");
|
||||
|
||||
req = (void *) &smp->preq[1];
|
||||
rsp = (void *) &smp->prsp[1];
|
||||
|
@ -2082,7 +2083,7 @@ static int fixup_sc_false_positive(struct smp_chan *smp)
|
|||
auth = req->auth_req & AUTH_REQ_MASK(hdev);
|
||||
|
||||
if (tk_request(conn, 0, auth, rsp->io_capability, req->io_capability)) {
|
||||
BT_ERR("Failed to fall back to legacy SMP");
|
||||
bt_dev_err(hdev, "failed to fall back to legacy SMP");
|
||||
return SMP_UNSPECIFIED;
|
||||
}
|
||||
|
||||
|
@ -2355,7 +2356,7 @@ int smp_conn_security(struct hci_conn *hcon, __u8 sec_level)
|
|||
|
||||
chan = conn->smp;
|
||||
if (!chan) {
|
||||
BT_ERR("SMP security requested but not available");
|
||||
bt_dev_err(hcon->hdev, "security requested but not available");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -2548,7 +2549,7 @@ static int smp_cmd_ident_addr_info(struct l2cap_conn *conn,
|
|||
*/
|
||||
if (!bacmp(&info->bdaddr, BDADDR_ANY) ||
|
||||
!hci_is_identity_address(&info->bdaddr, info->addr_type)) {
|
||||
BT_ERR("Ignoring IRK with no identity address");
|
||||
bt_dev_err(hcon->hdev, "ignoring IRK with no identity address");
|
||||
goto distribute;
|
||||
}
|
||||
|
||||
|
@ -2953,8 +2954,8 @@ done:
|
|||
return err;
|
||||
|
||||
drop:
|
||||
BT_ERR("%s unexpected SMP command 0x%02x from %pMR", hcon->hdev->name,
|
||||
code, &hcon->dst);
|
||||
bt_dev_err(hcon->hdev, "unexpected SMP command 0x%02x from %pMR",
|
||||
code, &hcon->dst);
|
||||
kfree_skb(skb);
|
||||
return 0;
|
||||
}
|
||||
|
@ -3021,8 +3022,7 @@ static void bredr_pairing(struct l2cap_chan *chan)
|
|||
|
||||
smp = smp_chan_create(conn);
|
||||
if (!smp) {
|
||||
BT_ERR("%s unable to create SMP context for BR/EDR",
|
||||
hdev->name);
|
||||
bt_dev_err(hdev, "unable to create SMP context for BR/EDR");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue