From 0a2b0f0452e2499a1037305fcfc314d0cdeb5260 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 30 Dec 2014 09:50:39 +0200 Subject: Bluetooth: Add skeleton for SMP self-tests This patch adds the initial skeleton and kernel config option for SMP self-tests. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann --- net/bluetooth/selftest.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'net/bluetooth/selftest.c') diff --git a/net/bluetooth/selftest.c b/net/bluetooth/selftest.c index b9cb33cd45d7..a7602b3d0b0d 100644 --- a/net/bluetooth/selftest.c +++ b/net/bluetooth/selftest.c @@ -22,8 +22,10 @@ */ #include +#include #include "ecc.h" +#include "smp.h" #include "selftest.h" #if IS_ENABLED(CONFIG_BT_SELFTEST_ECDH) @@ -195,7 +197,12 @@ static int __init run_selftest(void) BT_INFO("Starting self testing"); err = test_ecdh(); + if (err) + goto done; + err = bt_selftest_smp(); + +done: BT_INFO("Finished self testing"); return err; -- cgit v1.2.3