Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f558b70 authored by Loic Poulain's avatar Loic Poulain Committed by Marcel Holtmann
Browse files

Bluetooth: Add bt_dev logging macros



Add specific bluetooth device logging macros since hci device name is
repeatedly referred in bluetooth subsystem logs.

Signed-off-by: default avatarLoic Poulain <loic.poulain@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 6cafcd95
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -128,6 +128,13 @@ void bt_err(const char *fmt, ...);
#define BT_ERR(fmt, ...)	bt_err(fmt "\n", ##__VA_ARGS__)
#define BT_ERR(fmt, ...)	bt_err(fmt "\n", ##__VA_ARGS__)
#define BT_DBG(fmt, ...)	pr_debug(fmt "\n", ##__VA_ARGS__)
#define BT_DBG(fmt, ...)	pr_debug(fmt "\n", ##__VA_ARGS__)


#define bt_dev_info(hdev, fmt, ...)				\
	BT_INFO("%s: " fmt, (hdev)->name, ##__VA_ARGS__)
#define bt_dev_err(hdev, fmt, ...)				\
	BT_ERR("%s: " fmt, (hdev)->name, ##__VA_ARGS__)
#define bt_dev_dbg(hdev, fmt, ...)				\
	BT_DBG("%s: " fmt, (hdev)->name, ##__VA_ARGS__)

/* Connection and socket states */
/* Connection and socket states */
enum {
enum {
	BT_CONNECTED = 1, /* Equal to TCP_ESTABLISHED to make net code happy */
	BT_CONNECTED = 1, /* Equal to TCP_ESTABLISHED to make net code happy */