summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSudha Bheemanna <b.sudha@samsung.com>2016-09-15 12:53:03 +0530
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:53:23 +0900
commitdea18f7ec613158bc2243e641555dc0499e97cf8 (patch)
tree28a6f7b47567d4cf59851d48f878d6fd15449fe1 /include
parent6cf64e5f18a973023fec47bcf47ce79aa4035cc4 (diff)
Bluetooth: IPSP Connect/Disconnect apis
This patch adds MGMT code to support IPSP connect and disconnect apis and handle connection state changed event. Change-Id: I1c41ec4f38cf9a108e443def3bc23c1b964e2985 Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/bluetooth/hci_core.h2
-rw-r--r--include/net/bluetooth/l2cap.h5
-rw-r--r--include/net/bluetooth/mgmt_tizen.h18
3 files changed, 25 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index ecbdcb2be062..0df3493056c3 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -1550,6 +1550,8 @@ void mgmt_le_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
u16 eir_len, u8 *scan_rsp, u8 scan_rsp_len, u8 adv_type);
void mgmt_multi_adv_state_change_evt(struct hci_dev *hdev, u8 adv_instance,
u8 state_change_reason, u16 connection_handle);
+void mgmt_6lowpan_conn_changed(struct hci_dev *hdev, char if_name[16],
+ bdaddr_t *bdaddr, u8 addr_type, bool connected);
#endif
u8 hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max, u16 latency,
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 07fbd99b0866..11b05eccd6e8 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -943,9 +943,14 @@ void l2cap_unregister_user(struct l2cap_conn *conn, struct l2cap_user *user);
/* 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 */
diff --git a/include/net/bluetooth/mgmt_tizen.h b/include/net/bluetooth/mgmt_tizen.h
index 2f48ab9abb4a..03a4d63ce84b 100644
--- a/include/net/bluetooth/mgmt_tizen.h
+++ b/include/net/bluetooth/mgmt_tizen.h
@@ -173,6 +173,18 @@ struct mgmt_cp_enable_6lowpan {
} __packed;
#define MGMT_ENABLE_BT_6LOWPAN_SIZE 1
+#define MGMT_OP_CONNECT_6LOWPAN (TIZEN_OP_CODE_BASE + 0x13)
+struct mgmt_cp_connect_6lowpan {
+ struct mgmt_addr_info addr;
+} __packed;
+#define MGMT_CONNECT_6LOWPAN_SIZE 7
+
+#define MGMT_OP_DISCONNECT_6LOWPAN (TIZEN_OP_CODE_BASE + 0x14)
+struct mgmt_cp_disconnect_6lowpan {
+ struct mgmt_addr_info addr;
+} __packed;
+#define MGMT_DISCONNECT_6LOWPAN_SIZE 7
+
/* EVENTS */
/* For device name update changes */
@@ -254,4 +266,10 @@ struct mgmt_ev_vendor_specific_multi_adv_state_changed {
} __packed;
/* LE advertisement state changed event */
+#define MGMT_EV_6LOWPAN_CONN_STATE_CHANGED (TIZEN_EV_BASE + 0x0c)
+struct mgmt_ev_6lowpan_conn_state_changed {
+ struct mgmt_addr_info addr;
+ __u8 connected;
+ __u8 ifname[16];
+} __packed;
#endif /* __MGMT_TIZEN_H */