summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxinhe <xinhe@google.com>2015-03-02 17:00:33 -0800
committerxinhe <xinhe@google.com>2015-03-02 17:00:33 -0800
commitc5ab50d206f601f83510a41859e2d3a5884cd012 (patch)
tree28569380c00a6fb487e8c051d1f20d838cf5c8b7
parent3ab1f9868cb0d05f0994d0f746fe2d51d92cbce3 (diff)
downloadhardware_libhardware_legacy-c5ab50d206f601f83510a41859e2d3a5884cd012.zip
hardware_libhardware_legacy-c5ab50d206f601f83510a41859e2d3a5884cd012.tar.gz
hardware_libhardware_legacy-c5ab50d206f601f83510a41859e2d3a5884cd012.tar.bz2
modify the interface rtt.h
Bug:19570769 Change-Id: Ifaa86c8f0a2023e3c4595bf7e7265332b70a37a2
-rw-r--r--include/hardware_legacy/rtt.h36
1 files changed, 34 insertions, 2 deletions
diff --git a/include/hardware_legacy/rtt.h b/include/hardware_legacy/rtt.h
index 1afcadd..37defe7 100644
--- a/include/hardware_legacy/rtt.h
+++ b/include/hardware_legacy/rtt.h
@@ -12,8 +12,11 @@ typedef enum {
RTT_STATUS_SUCCESS,
RTT_STATUS_FAILURE,
RTT_STATUS_FAIL_NO_RSP,
+ RTT_STATUS_FAIL_INVALID_TS, // Invalid T1-T4 timestamp
+ RTT_STATUS_FAIL_PROTOCOL, // 11mc protocol failed
RTT_STATUS_FAIL_REJECTED,
RTT_STATUS_FAIL_NOT_SCHEDULED_YET,
+ RTT_STATUS_FAIL_SCHEDULE, // schedule failed
RTT_STATUS_FAIL_TM_TIMEOUT,
RTT_STATUS_FAIL_AP_ON_DIFF_CHANNEL,
RTT_STATUS_FAIL_NO_CAPABILITY,
@@ -37,10 +40,9 @@ typedef struct {
// RTT_TYPE_AUTO implies best effort
wifi_peer_type peer; // optional - peer device hint (STA, P2P, AP)
wifi_channel_info channel; // Required for STA-AP mode, optional for P2P, NBD etc.
- byte multi_burst; // 0 = single burst or 1 = multi burst ranging
unsigned interval; // interval between RTT burst (unit ms).
// Only valid when multi_burst = 1
- unsigned num_burst; // total number of RTT bursts when multi_burst = 1
+ unsigned num_burst; // total number of RTT bursts, 0 means single shot
unsigned num_frames_per_burst; // num of frames in each RTT burst
// for single side, measurement result num = frame number
// for 2 side RTT, measurement result num = frame number - 1
@@ -140,5 +142,35 @@ typedef struct {
/* RTT capabilities of the device */
wifi_error wifi_get_rtt_capabilities(wifi_interface_handle iface, wifi_rtt_capabilities *capabilities);
+/* debugging definitions */
+enum {
+ RTT_DEBUG_DISABLE,
+ RTT_DEBUG_LOG,
+ RTT_DEBUG_PROTO,
+ RTT_DEBUG_BURST,
+ RTT_DEBUG_ACCURACY,
+ RTT_DEBUG_LOGDETAIL
+}; //rtt debug type
+
+enum {
+ RTT_DEBUG_FORMAT_TXT,
+ RTT_DEBUG_FORMAT_BINARY
+}; //rtt debug format
+
+typedef struct rtt_debug {
+ unsigned version;
+ unsigned len; // total length of after len field
+ unsigned type; // rtt debug type
+ unsigned format; //rtt debug format
+ char dbuf[0]; // debug content
+} rtt_debug_t;
+
+/* set configuration for debug */
+wifi_error wifi_rtt_debug_cfg(wifi_interface_handle h, unsigned rtt_dbg_type, char *cfgbuf, u32 cfg_buf_size);
+/* get the debug information */
+wifi_error wifi_rtt_debug_get(wifi_interface_handle h, rtt_debug_t **debugbuf);
+/* free the debug buffer */
+wifi_error wifi_rtt_debug_free(wifi_interface_handle h, rtt_debug_t *debugbuf);
+
#endif