diff options
author | Vinit Deshpande <vinitd@google.com> | 2015-03-14 22:10:17 -0700 |
---|---|---|
committer | Vinit Deshpande <vinitd@google.com> | 2015-03-14 22:10:17 -0700 |
commit | c901baced20270e925bc6100b4fdac912d4f6aec (patch) | |
tree | fa4ec49783f6e8ed6693299be8b56fe3547b3c22 | |
parent | b7eee4b01f75e917ca9c3282b8721b5e495474f8 (diff) | |
parent | c5ab50d206f601f83510a41859e2d3a5884cd012 (diff) | |
download | hardware_libhardware_legacy-c901baced20270e925bc6100b4fdac912d4f6aec.zip hardware_libhardware_legacy-c901baced20270e925bc6100b4fdac912d4f6aec.tar.gz hardware_libhardware_legacy-c901baced20270e925bc6100b4fdac912d4f6aec.tar.bz2 |
am "modify the interface rtt.h"
merged from goog/mirror-m-wireless-internal-release
c5ab50d modify the interface rtt.h
-rw-r--r-- | include/hardware_legacy/rtt.h | 36 |
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 |