From 49ca69f5ce081efcb3caf835a9988300354e0125 Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Fri, 30 Sep 2016 17:15:12 +0900 Subject: [PATCH] Bluetooth: fix build error without BT_6LOWPAN 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 --- include/net/bluetooth/bluetooth.h | 6 ------ include/net/bluetooth/l2cap.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 6e25b81e5b60..4830ea890192 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h @@ -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 */ diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 83869fee6792..11b05eccd6e8 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h @@ -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 */ -- 2.34.1