Bluetooth: fix build error without BT_6LOWPAN 88/90488/2
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 30 Sep 2016 08:15:12 +0000 (17:15 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 30 Sep 2016 09:47:54 +0000 (18:47 +0900)
Without config option BT_6LOWPAN, no 6lowpan functions are built-in,
so it causes build error. This patch fixes the build error.

Change-Id: If5bcea028dc8127a0451fb4f35bd4cd83ca43dc5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
include/net/bluetooth/bluetooth.h
include/net/bluetooth/l2cap.h

index 6e25b81e5b606e56530f52e9408d1d65162b6035..4830ea890192cf846ea3bba1edce3a8ce683fbc8 100644 (file)
@@ -383,10 +383,4 @@ void mgmt_exit(void);
 
 void bt_sock_reclassify_lock(struct sock *sk, int proto);
 
-#ifdef TIZEN_BT
-/* IPSP : initialize/deinitialize 6lowpan */
-void bt_6lowpan_enable(void);
-void bt_6lowpan_disable(void);
-#endif
-
 #endif /* __BLUETOOTH_H */
index 83869fee67922b92ed03ef6cae8121ec2048888c..11b05eccd6e8b10992c01deef6f5e2a1edb94eea 100644 (file)
@@ -939,9 +939,19 @@ int l2cap_register_user(struct l2cap_conn *conn, struct l2cap_user *user);
 void l2cap_unregister_user(struct l2cap_conn *conn, struct l2cap_user *user);
 
 #ifdef TIZEN_BT
+#ifdef CONFIG_BT_6LOWPAN
+/* IPSP : initialize/deinitialize 6lowpan */
+void bt_6lowpan_enable(void);
+void bt_6lowpan_disable(void);
 /* IPSP: Connect and Disconnect */
 int _bt_6lowpan_connect(bdaddr_t *addr, u8 dst_type);
 int _bt_6lowpan_disconnect(struct l2cap_conn *conn, u8 dst_type);
+#else
+static inline void bt_6lowpan_enable(void) { }
+static inline void bt_6lowpan_disable(void) { }
+static inline int _bt_6lowpan_connect(bdaddr_t *addr, u8 dst_type) { return -ENODEV; }
+static inline int _bt_6lowpan_disconnect(struct l2cap_conn *conn, u8 dst_type) { return -ENODEV; }
 #endif
+#endif /* TIZEN_BT */
 
 #endif /* __L2CAP_H */