summaryrefslogtreecommitdiff
path: root/net/bluetooth/selftest.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-12-30 10:50:39 +0300
committerMarcel Holtmann <marcel@holtmann.org>2014-12-30 10:54:33 +0300
commit0a2b0f0452e2499a1037305fcfc314d0cdeb5260 (patch)
tree40be3edc04c30fe22299dd40bc95dad9036756fb /net/bluetooth/selftest.c
parent0b6415b65234ff723d32fd7dcdd917ba7ad5fe86 (diff)
downloadlinux-0a2b0f0452e2499a1037305fcfc314d0cdeb5260.tar.xz
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 <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/selftest.c')
-rw-r--r--net/bluetooth/selftest.c7
1 files changed, 7 insertions, 0 deletions
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 <net/bluetooth/bluetooth.h>
+#include <net/bluetooth/hci_core.h>
#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;