summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSudha Bheemanna <b.sudha@samsung.com>2016-09-16 15:37:22 +0530
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:53:27 +0900
commitd4e62d53870f259cce1868920432576ee749ab51 (patch)
tree12c605a5bf060381902e1b41d89cd8e416c936b4 /include
parent00ee9494f355d01ed48f22464ef9ce563a176422 (diff)
Bluetooth: Set le data length command and event
Sets the data length for the le data packet with in the advised limits. MGMT command and event are added to handle the setting of data length. Change-Id: I3dbcbba83098e17f0e6da209753f8924ffb67678 Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/bluetooth/hci_core.h14
-rw-r--r--include/net/bluetooth/mgmt_tizen.h24
2 files changed, 38 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 7843ada51bc7..f9d117c1bf14 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -465,6 +465,12 @@ struct hci_conn {
__u8 remote_id;
unsigned int sent;
+#ifdef TIZEN_BT
+ __u16 tx_len;
+ __u16 tx_time;
+ __u16 rx_len;
+ __u16 rx_time;
+#endif
struct sk_buff_head data_q;
struct list_head chan_list;
@@ -515,6 +521,10 @@ struct hci_conn_params {
u16 conn_latency;
u16 supervision_timeout;
+#ifdef TIZEN_BT
+ u16 max_tx_octets;
+ u16 max_tx_time;
+#endif
enum {
HCI_AUTO_CONN_DISABLED,
HCI_AUTO_CONN_REPORT,
@@ -1558,6 +1568,10 @@ void mgmt_le_write_host_suggested_data_length_complete(struct hci_dev *hdev,
u8 status);
void mgmt_le_read_host_suggested_data_length_complete(struct hci_dev *hdev,
u8 status);
+void mgmt_le_data_length_change_complete(struct hci_dev *hdev,
+ bdaddr_t *bdaddr, u16 tx_octets, u16 tx_time,
+ u16 rx_octets, u16 rx_time);
+int hci_le_set_data_length(struct hci_conn *conn, u16 tx_octets, u16 tx_time);
#endif
u8 hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max, u16 latency,
diff --git a/include/net/bluetooth/mgmt_tizen.h b/include/net/bluetooth/mgmt_tizen.h
index 022e51060713..cfb9d5064789 100644
--- a/include/net/bluetooth/mgmt_tizen.h
+++ b/include/net/bluetooth/mgmt_tizen.h
@@ -208,6 +208,20 @@ struct mgmt_rp_le_read_host_suggested_data_length {
} __packed;
#define MGMT_LE_READ_HOST_SUGGESTED_DATA_LENGTH_SIZE 0
+#define MGMT_OP_LE_SET_DATA_LENGTH (TIZEN_OP_CODE_BASE + 0x18)
+struct mgmt_cp_le_set_data_length {
+ bdaddr_t bdaddr;
+ __le16 max_tx_octets;
+ __le16 max_tx_time;
+} __packed;
+#define MGMT_LE_SET_DATA_LENGTH_SIZE 10
+
+struct mgmt_rp_le_set_data_length {
+ __u8 status;
+ __le16 handle;
+} __packed;
+#define MGMT_LE_SET_DATA_LENGTH_RSP_SIZE 3
+
/* EVENTS */
/* For device name update changes */
@@ -295,4 +309,14 @@ struct mgmt_ev_6lowpan_conn_state_changed {
__u8 connected;
__u8 ifname[16];
} __packed;
+
+#define MGMT_EV_LE_DATA_LENGTH_CHANGED (TIZEN_EV_BASE + 0x0d)
+struct mgmt_ev_le_data_length_changed {
+ struct mgmt_addr_info addr;
+ __le16 max_tx_octets;
+ __le16 max_tx_time;
+ __le16 max_rx_octets;
+ __le16 max_rx_time;
+} __packed;
+
#endif /* __MGMT_TIZEN_H */