summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2014-07-01 18:10:11 -0300
committerMarcel Holtmann <marcel@holtmann.org>2014-07-03 17:42:55 +0200
commitffb5a827d5ca5aef3f3fe5d64e42f3cf7fed4fc8 (patch)
tree110209210a236f8d7bda497c7d42f7ca4d18b10d /include/net
parent662bc2e63de765bb701e3d3eca6af9fe553d72ac (diff)
downloadblackbird-op-linux-ffb5a827d5ca5aef3f3fe5d64e42f3cf7fed4fc8.tar.gz
blackbird-op-linux-ffb5a827d5ca5aef3f3fe5d64e42f3cf7fed4fc8.zip
Bluetooth: Introduce "New Connection Parameter" Event
This patch introduces a new Mgmt event called "New Connection Parameter". This event indicates to userspace the connection parameters values the remote device requested. The user may store these values and load them into kernel. This way, next time a connection is established to that device, the kernel will use those parameters values instead of the default ones. This event is sent when the remote device requests new connection parameters through connection parameter update procedure. This event is not sent for slave connections. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci_core.h3
-rw-r--r--include/net/bluetooth/mgmt.h10
2 files changed, 13 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 3404f9bd2da0..01fbbe20defb 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -1329,6 +1329,9 @@ void mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key, bool persistent);
void mgmt_new_irk(struct hci_dev *hdev, struct smp_irk *irk);
void mgmt_new_csrk(struct hci_dev *hdev, struct smp_csrk *csrk,
bool persistent);
+void mgmt_new_conn_param(struct hci_dev *hdev, bdaddr_t *bdaddr,
+ u8 bdaddr_type, u16 min_interval, u16 max_interval,
+ u16 latency, u16 timeout);
void mgmt_reenable_advertising(struct hci_dev *hdev);
void mgmt_smp_complete(struct hci_conn *conn, bool complete);
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index 2d88f361a016..3c0f29614d1b 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -615,3 +615,13 @@ struct mgmt_ev_device_added {
struct mgmt_ev_device_removed {
struct mgmt_addr_info addr;
} __packed;
+
+#define MGMT_EV_NEW_CONN_PARAM 0x001c
+struct mgmt_ev_new_conn_param {
+ struct mgmt_addr_info addr;
+ __u8 store_hint;
+ __le16 min_interval;
+ __le16 max_interval;
+ __le16 latency;
+ __le16 timeout;
+} __packed;
OpenPOWER on IntegriCloud