diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2017-10-30 05:42:59 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2017-10-30 06:25:45 -0400 |
commit | 2064ee332e4c1b7495cf68b84355c213d8fe71fd (patch) | |
tree | 9bb470d9296dbf14c02a67612fe83c32fec3ba6d /net/bluetooth/hci_request.c | |
parent | a9ee77af751f435675054f5a7e2d2e69cbfe9e33 (diff) |
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>
Diffstat (limited to 'net/bluetooth/hci_request.c')
-rw-r--r-- | net/bluetooth/hci_request.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 7f28d17dc792..abc0f3224dd1 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c | |||
@@ -336,8 +336,8 @@ void hci_req_add_ev(struct hci_request *req, u16 opcode, u32 plen, | |||
336 | 336 | ||
337 | skb = hci_prepare_cmd(hdev, opcode, plen, param); | 337 | skb = hci_prepare_cmd(hdev, opcode, plen, param); |
338 | if (!skb) { | 338 | if (!skb) { |
339 | BT_ERR("%s no memory for command (opcode 0x%4.4x)", | 339 | bt_dev_err(hdev, "no memory for command (opcode 0x%4.4x)", |
340 | hdev->name, opcode); | 340 | opcode); |
341 | req->err = -ENOMEM; | 341 | req->err = -ENOMEM; |
342 | return; | 342 | return; |
343 | } | 343 | } |
@@ -1426,7 +1426,7 @@ int hci_update_random_address(struct hci_request *req, bool require_privacy, | |||
1426 | 1426 | ||
1427 | err = smp_generate_rpa(hdev, hdev->irk, &hdev->rpa); | 1427 | err = smp_generate_rpa(hdev, hdev->irk, &hdev->rpa); |
1428 | if (err < 0) { | 1428 | if (err < 0) { |
1429 | BT_ERR("%s failed to generate new RPA", hdev->name); | 1429 | bt_dev_err(hdev, "failed to generate new RPA"); |
1430 | return err; | 1430 | return err; |
1431 | } | 1431 | } |
1432 | 1432 | ||
@@ -1788,7 +1788,7 @@ int hci_abort_conn(struct hci_conn *conn, u8 reason) | |||
1788 | 1788 | ||
1789 | err = hci_req_run(&req, abort_conn_complete); | 1789 | err = hci_req_run(&req, abort_conn_complete); |
1790 | if (err && err != -ENODATA) { | 1790 | if (err && err != -ENODATA) { |
1791 | BT_ERR("Failed to run HCI request: err %d", err); | 1791 | bt_dev_err(conn->hdev, "failed to run HCI request: err %d", err); |
1792 | return err; | 1792 | return err; |
1793 | } | 1793 | } |
1794 | 1794 | ||
@@ -1872,7 +1872,8 @@ static void le_scan_disable_work(struct work_struct *work) | |||
1872 | 1872 | ||
1873 | hci_req_sync(hdev, le_scan_disable, 0, HCI_CMD_TIMEOUT, &status); | 1873 | hci_req_sync(hdev, le_scan_disable, 0, HCI_CMD_TIMEOUT, &status); |
1874 | if (status) { | 1874 | if (status) { |
1875 | BT_ERR("Failed to disable LE scan: status 0x%02x", status); | 1875 | bt_dev_err(hdev, "failed to disable LE scan: status 0x%02x", |
1876 | status); | ||
1876 | return; | 1877 | return; |
1877 | } | 1878 | } |
1878 | 1879 | ||
@@ -1903,7 +1904,7 @@ static void le_scan_disable_work(struct work_struct *work) | |||
1903 | hci_req_sync(hdev, bredr_inquiry, DISCOV_INTERLEAVED_INQUIRY_LEN, | 1904 | hci_req_sync(hdev, bredr_inquiry, DISCOV_INTERLEAVED_INQUIRY_LEN, |
1904 | HCI_CMD_TIMEOUT, &status); | 1905 | HCI_CMD_TIMEOUT, &status); |
1905 | if (status) { | 1906 | if (status) { |
1906 | BT_ERR("Inquiry failed: status 0x%02x", status); | 1907 | bt_dev_err(hdev, "inquiry failed: status 0x%02x", status); |
1907 | goto discov_stopped; | 1908 | goto discov_stopped; |
1908 | } | 1909 | } |
1909 | 1910 | ||
@@ -1945,7 +1946,8 @@ static void le_scan_restart_work(struct work_struct *work) | |||
1945 | 1946 | ||
1946 | hci_req_sync(hdev, le_scan_restart, 0, HCI_CMD_TIMEOUT, &status); | 1947 | hci_req_sync(hdev, le_scan_restart, 0, HCI_CMD_TIMEOUT, &status); |
1947 | if (status) { | 1948 | if (status) { |
1948 | BT_ERR("Failed to restart LE scan: status %d", status); | 1949 | bt_dev_err(hdev, "failed to restart LE scan: status %d", |
1950 | status); | ||
1949 | return; | 1951 | return; |
1950 | } | 1952 | } |
1951 | 1953 | ||