summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/6lowpan.h
diff options
context:
space:
mode:
authorAlexander Aring2014-03-04 10:23:02 +0100
committerMarcel Holtmann2014-03-11 15:54:55 +0100
commit97550887973d04e344f5ccee392d7650d01f8f69 (patch)
treeda75e61a559df920add47dce114d2270c1d2dbb7 /net/bluetooth/6lowpan.h
parentBluetooth: Make LTK and CSRK only persisent when bonding (diff)
downloadkernel-qcow2-linux-97550887973d04e344f5ccee392d7650d01f8f69.tar.gz
kernel-qcow2-linux-97550887973d04e344f5ccee392d7650d01f8f69.tar.xz
kernel-qcow2-linux-97550887973d04e344f5ccee392d7650d01f8f69.zip
Bluetooth: make bluetooth 6lowpan as an option
Currently you can have bluetooth 6lowpan without ipv6 enabled. This doesn't make any sense. With this patch you can disable/enable bluetooth 6lowpan support at compile time. The current bluetooth 6lowpan implementation doesn't check the return value of 6lowpan function. Nevertheless I added -EOPNOTSUPP as return value if 6lowpan bluetooth is disabled. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/6lowpan.h')
-rw-r--r--net/bluetooth/6lowpan.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/net/bluetooth/6lowpan.h b/net/bluetooth/6lowpan.h
index 680eac808d74..5d281f1eaf55 100644
--- a/net/bluetooth/6lowpan.h
+++ b/net/bluetooth/6lowpan.h
@@ -14,13 +14,34 @@
#ifndef __6LOWPAN_H
#define __6LOWPAN_H
+#include <linux/errno.h>
#include <linux/skbuff.h>
#include <net/bluetooth/l2cap.h>
+#if IS_ENABLED(CONFIG_BT_6LOWPAN)
int bt_6lowpan_recv(struct l2cap_conn *conn, struct sk_buff *skb);
int bt_6lowpan_add_conn(struct l2cap_conn *conn);
int bt_6lowpan_del_conn(struct l2cap_conn *conn);
int bt_6lowpan_init(void);
void bt_6lowpan_cleanup(void);
+#else
+static int bt_6lowpan_recv(struct l2cap_conn *conn, struct sk_buff *skb)
+{
+ return -EOPNOTSUPP;
+}
+static int bt_6lowpan_add_conn(struct l2cap_conn *conn)
+{
+ return -EOPNOTSUPP;
+}
+int bt_6lowpan_del_conn(struct l2cap_conn *conn)
+{
+ return -EOPNOTSUPP;
+}
+static int bt_6lowpan_init(void)
+{
+ return -EOPNOTSUPP;
+}
+static void bt_6lowpan_cleanup(void) { }
+#endif
#endif /* __6LOWPAN_H */