From a2241a55fd3850daf6679ee1fc58c8292b17c4aa Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 30 Jun 2015 10:47:53 +0300 Subject: [PATCH] Bluetooth: Add config option for security keys handling This makes sure that keys.c doesn't always have its BT_DBG logs enabled. Change-Id: Ia97149f08a448f55a15c3282f72afb23c495b715 Signed-off-by: Johan Hedberg --- net/bluetooth/Kconfig | 9 +++++++++ net/bluetooth/keys.c | 5 +++++ 2 files changed, 14 insertions(+) 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)