Bluetooth: Add support for self testing framework

This add support for the Bluetooth self testing framework that allows
running certain test cases of sample data to ensure correctness of its
basic functionality.

With this patch only the basic framework will be added. It contains
the build magic that allows running this at module loading time or
at late_initcall stage when built into the kernel image.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
diff --git a/net/bluetooth/Makefile b/net/bluetooth/Makefile
index 364cff1..8e96e30 100644
--- a/net/bluetooth/Makefile
+++ b/net/bluetooth/Makefile
@@ -15,4 +15,6 @@
 	hci_sock.o hci_sysfs.o l2cap_core.o l2cap_sock.o smp.o sco.o lib.o \
 	a2mp.o amp.o ecc.o hci_request.o hci_debugfs.o
 
+bluetooth-$(CONFIG_BT_SELFTEST) += selftest.o
+
 subdir-ccflags-y += -D__CHECK_ENDIAN__