From 7f9696c182ce51d804c4dbad7f8f822ebd14bb34 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Thu, 11 Feb 2016 18:13:26 +0100 Subject: [PATCH] Bluetooth: SMP: Fix compilation with SC Only mode enabled legacy_pairing_rsp is used only for legacy pairing. Fix following with CONFIG_BLUETOOTH_SMP_SC_ONLY set. CC net/bluetooth/smp.o net/bluetooth/smp.c: In function 'legacy_pairing_rsp': net/bluetooth/smp.c:1207:16: warning: implicit declaration of function 'legacy_get_pair_method' [-Wimplicit-function-declaration] smp->method = legacy_get_pair_method(smp, remote_io); ^ net/bluetooth/smp.c:1209:8: warning: implicit declaration of function 'legacy_request_tk' [-Wimplicit-function-declaration] ret = legacy_request_tk(smp); ^ net/bluetooth/smp.c:1216:10: warning: implicit declaration of function 'legacy_send_pairing_confirm' [-Wimplicit-function-declaration] return legacy_send_pairing_confirm(smp); ^ net/bluetooth/smp.c: At top level: net/bluetooth/smp.c:1201:16: warning: 'legacy_pairing_rsp' defined but not used [-Wunused-function] static uint8_t legacy_pairing_rsp(struct bt_smp *smp, uint8_t remote_io) ^ Change-Id: I0d65efa71859c23cf5b6f0bfa3386a23543bf907 Signed-off-by: Szymon Janc --- net/bluetooth/smp.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 0db62150ae..3775d1b589 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -1185,17 +1185,6 @@ static uint8_t smp_master_ident(struct bt_smp *smp, struct net_buf *buf) return 0; } -#else -static uint8_t smp_encrypt_info(struct bt_smp *smp, struct net_buf *buf) -{ - return BT_SMP_ERR_CMD_NOTSUPP; -} - -static uint8_t smp_master_ident(struct bt_smp *smp, struct net_buf *buf) -{ - return BT_SMP_ERR_CMD_NOTSUPP; -} -#endif /* !CONFIG_BLUETOOTH_SMP_SC_ONLY */ #if defined(CONFIG_BLUETOOTH_CENTRAL) static uint8_t legacy_pairing_rsp(struct bt_smp *smp, uint8_t remote_io) @@ -1221,6 +1210,17 @@ static uint8_t legacy_pairing_rsp(struct bt_smp *smp, uint8_t remote_io) return 0; } #endif /* CONFIG_BLUETOOTH_CENTRAL */ +#else +static uint8_t smp_encrypt_info(struct bt_smp *smp, struct net_buf *buf) +{ + return BT_SMP_ERR_CMD_NOTSUPP; +} + +static uint8_t smp_master_ident(struct bt_smp *smp, struct net_buf *buf) +{ + return BT_SMP_ERR_CMD_NOTSUPP; +} +#endif /* !CONFIG_BLUETOOTH_SMP_SC_ONLY */ static int smp_init(struct bt_smp *smp) {