Bluetooth: Poll for RSSI updates from the remote device
This feature is required for implementing Low energy
proximity client immediate alert service. The proximtiy
client registers with the kernel for receiving RSSI updates
of the remote device. The kernel starts polling for RSSI
value using READ_RSSI HCI command and When it reaches
a particular threshold set by the proximity client,
updates are sent to the client.
Change-Id: I723dd140ad3bf02978c57b3ab127bb6768f28cca
CRs-fixed: 344936
Signed-off-by: Archana Ramachandran <archanar@codeaurora.org>
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index 9c089e0..e34c425 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -233,6 +233,19 @@
__u8 enable;
} __packed;
+#define MGMT_OP_SET_RSSI_REPORTER 0x0022
+struct mgmt_cp_set_rssi_reporter {
+ bdaddr_t bdaddr;
+ __s8 rssi_threshold;
+ __le16 interval;
+ __u8 updateOnThreshExceed;
+} __packed;
+
+#define MGMT_OP_UNSET_RSSI_REPORTER 0x0023
+struct mgmt_cp_unset_rssi_reporter {
+ bdaddr_t bdaddr;
+} __packed;
+
#define MGMT_EV_CMD_COMPLETE 0x0001
struct mgmt_ev_cmd_complete {
__le16 opcode;
@@ -360,3 +373,9 @@
bdaddr_t bdaddr;
uint8_t features[8];
} __packed;
+
+#define MGMT_EV_RSSI_UPDATE 0x0020
+struct mgmt_ev_rssi_update {
+ bdaddr_t bdaddr;
+ __s8 rssi;
+} __packed;