diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig index e2ef36088ea..50ad9bcfc9e 100644 --- a/net/bluetooth/Kconfig +++ b/net/bluetooth/Kconfig @@ -93,6 +93,15 @@ config BLUETOOTH_DEBUG_CONN This option enables debug support for Bluetooth connection handling. +config BLUETOOTH_DEBUG_KEYS + bool + prompt "Bluetooth security keys debug" + depends on BLUETOOTH_DEBUG + default n + help + This option enables debug support for the handling of + Bluetooth security keys. + config BLUETOOTH_DEBUG_L2CAP bool prompt "Bluetooth L2CAP debug" diff --git a/net/bluetooth/keys.c b/net/bluetooth/keys.c index f33cb510533..a2f41adf881 100644 --- a/net/bluetooth/keys.c +++ b/net/bluetooth/keys.c @@ -42,6 +42,11 @@ #include "smp.h" #include "keys.h" +#if !defined(CONFIG_BLUETOOTH_DEBUG_KEYS) +#undef BT_DBG +#define BT_DBG(fmt, ...) +#endif + #define bt_keys_foreach(list, cur, member) \ for (cur = list; *cur; cur = &(*cur)->member)