diff options
| author | tinlin <tinlin@codeaurora.org> | 2018-04-12 10:11:52 +0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-04-12 20:23:16 -0700 |
| commit | 9d07a810dd6438c41d8d8d3bdcd142e81e5f9d1d (patch) | |
| tree | 87bb4d889fe1a56268ffed87ce1201ee1fe7e21d | |
| parent | be5e8c505ffda980bc3cf5b74d429ec5fe6b5b53 (diff) | |
qcacld-2.0: CL 4250652 - Update fw common interface files
Define WMI_REQUEST_ROAM_SCAN_STATS_CMDID.
Change-Id: Ia55285eb8af9052d0dda38c058c1532d24a22c5b
CRs-fixed: 865207
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_tlv_defs.h | 28 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_unified.h | 102 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_version.h | 2 | ||||
| -rw-r--r-- | CORE/SERVICES/WMI/wmi_unified.c | 1 |
4 files changed, 132 insertions, 1 deletions
diff --git a/CORE/SERVICES/COMMON/wmi_tlv_defs.h b/CORE/SERVICES/COMMON/wmi_tlv_defs.h index cef15bbc9aa8..d42c3b5ee624 100644 --- a/CORE/SERVICES/COMMON/wmi_tlv_defs.h +++ b/CORE/SERVICES/COMMON/wmi_tlv_defs.h @@ -902,6 +902,8 @@ typedef enum { WMITLV_TAG_STRUC_wmi_twt_del_dialog_complete_event_fixed_param, WMITLV_TAG_STRUC_wmi_twt_pause_dialog_complete_event_fixed_param, WMITLV_TAG_STRUC_wmi_twt_resume_dialog_complete_event_fixed_param, + WMITLV_TAG_STRUC_wmi_request_roam_scan_stats_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_roam_scan_stats_event_fixed_param, } WMITLV_TAG_ID; /* @@ -1270,6 +1272,7 @@ typedef enum { OP(WMI_TWT_DEL_DIALOG_CMDID) \ OP(WMI_TWT_PAUSE_DIALOG_CMDID) \ OP(WMI_TWT_RESUME_DIALOG_CMDID) \ + OP(WMI_REQUEST_ROAM_SCAN_STATS_CMDID) \ /* add new CMD_LIST elements above this line */ /* @@ -1472,6 +1475,7 @@ typedef enum { OP(WMI_TWT_DEL_DIALOG_COMPLETE_EVENTID) \ OP(WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID) \ OP(WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID) \ + OP(WMI_ROAM_SCAN_STATS_EVENTID) \ /* add new EVT_LIST elements above this line */ @@ -2874,6 +2878,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_LPI_START_SCAN_CMDID); WMITLV_CREATE_PARAM_STRUC(WMI_LPI_STOP_SCAN_CMDID); +/* Request for roam stats Cmd */ +#define WMITLV_TABLE_WMI_REQUEST_ROAM_SCAN_STATS_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_request_roam_scan_stats_cmd_fixed_param, wmi_request_roam_scan_stats_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) + +WMITLV_CREATE_PARAM_STRUC(WMI_REQUEST_ROAM_SCAN_STATS_CMDID); + #define WMITLV_TABLE_WMI_LPI_RESULT_EVENTID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_lpi_result_event_fixed_param, wmi_lpi_result_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR) @@ -4888,6 +4898,24 @@ WMITLV_CREATE_PARAM_STRUC(WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_twt_resume_dialog_complete_event_fixed_param, wmi_twt_resume_dialog_complete_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID); +/* Event to send roam scan stats */ +#define WMITLV_TABLE_WMI_ROAM_SCAN_STATS_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_scan_stats_event_fixed_param, wmi_roam_scan_stats_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, client_id, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_FIXED_STRUC, wmi_roaming_timestamp, timestamp, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, num_channels, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, chan_info, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_FIXED_STRUC, wmi_mac_addr, old_bssid, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, is_roaming_success, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_FIXED_STRUC, wmi_mac_addr, new_bssid, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, num_roam_candidates, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_FIXED_STRUC, wmi_roam_scan_trigger_reason, roam_reason, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_FIXED_STRUC, wmi_mac_addr, bssid, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, score, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, channel, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, rssi, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_SCAN_STATS_EVENTID); + #ifdef __cplusplus } diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h index 275253b373d9..75bd20d84764 100644 --- a/CORE/SERVICES/COMMON/wmi_unified.h +++ b/CORE/SERVICES/COMMON/wmi_unified.h @@ -629,6 +629,8 @@ typedef enum { WMI_ROAM_BTM_CONFIG_CMDID, /** Enable or Disable Fast Initial Link Setup (FILS) feature */ WMI_ENABLE_FILS_CMDID, + /** Request for roam scan stats */ + WMI_REQUEST_ROAM_SCAN_STATS_CMDID, /** offload scan specific commands */ /** set offload scan AP profile */ @@ -1364,6 +1366,8 @@ typedef enum { WMI_ROAM_SYNCH_EVENTID, /** roam synch frame event */ WMI_ROAM_SYNCH_FRAME_EVENTID, + /** various roam scan stats */ + WMI_ROAM_SCAN_STATS_EVENTID, /** P2P disc found */ WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P), @@ -21540,6 +21544,7 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command) WMI_RETURN_STRING(WMI_TWT_DEL_DIALOG_CMDID); WMI_RETURN_STRING(WMI_TWT_PAUSE_DIALOG_CMDID); WMI_RETURN_STRING(WMI_TWT_RESUME_DIALOG_CMDID); + WMI_RETURN_STRING(WMI_REQUEST_ROAM_SCAN_STATS_CMDID); } return "Invalid WMI cmd"; @@ -22082,6 +22087,103 @@ typedef enum { #define WLM_FLAGS_PS_DISABLE_SYS_SLEEP 1 /* disable sys sleep */ +typedef enum { + WMI_ROAM_TRIGGER_REASON_NONE = 0, + WMI_ROAM_TRIGGER_REASON_PER, + WMI_ROAM_TRIGGER_REASON_BMISS, + WMI_ROAM_TRIGGER_REASON_LOW_RSSI, + WMI_ROAM_TRIGGER_REASON_HIGH_RSSI, + WMI_ROAM_TRIGGER_REASON_PERIODIC, + WMI_ROAM_TRIGGER_REASON_MAWC, + WMI_ROAM_TRIGGER_REASON_DENSE, + WMI_ROAM_TRIGGER_REASON_BACKGROUND, + WMI_ROAM_TRIGGER_REASON_FORCED, + WMI_ROAM_TRIGGER_REASON_BTM, + WMI_ROAM_TRIGGER_REASON_UNIT_TEST, + WMI_ROAM_TRIGGER_REASON_MAX, +} WMI_ROAM_TRIGGER_REASON_ID; + +/* value for DENSE roam trigger */ +#define WMI_RX_TRAFFIC_ABOVE_THRESHOLD 0x1 +#define WMI_TX_TRAFFIC_ABOVE_THRESHOLD 0x2 + +typedef struct { + A_UINT32 trigger_id; /* id from WMI_ROAM_TRIGGER_REASON_ID */ + /* interpretation of trigger value is as follows, for different trigger IDs + * ID = PER -> value = PER percentage + * ID = LOW_RSSI -> value = rssi in dB wrt noise floor, + * ID = HIGH_RSSI -> value = rssi in dB wrt to noise floor, + * ID = DENSE -> value = specification if it is tx or rx traffic threshold, + * (see WMI_[RX,TX]_TRAFFIC_ABOVE_THRESHOLD) + * ID = PERIODIC -> value = periodicity in ms + * + * for other IDs trigger_value would be 0 (invalid) + */ + A_UINT32 trigger_value; +} wmi_roam_scan_trigger_reason; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_roam_scan_stats_cmd_fixed_param */ + A_UINT32 vdev_id; +} wmi_request_roam_scan_stats_cmd_fixed_param; + +typedef struct { + /* + * The timestamp is in units of ticks of a 19.2MHz clock. + * The timestamp is taken at roam scan start. + */ + A_UINT32 lower32bit; + A_UINT32 upper32bit; +} wmi_roaming_timestamp; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_stats_event_fixed_param */ + A_UINT32 vdev_id; + /* number of roam scans */ + A_UINT32 num_roam_scans; + /* This TLV is followed by TLV's: + * A_UINT32 client_id[num_roam_scans]; based on WMI_SCAN_CLIENT_ID + * wmi_roaming_timestamp timestamp[num_roam_scans]; clock ticks at the time of scan start + * A_UINT32 num_channels[num_roam_scans]; number of channels that are scanned + * A_UINT32 chan_info[]; channel frequencies (MHz) in each scan + * The num_channels[] elements specify how many elements there are + * within chan_info[] for each scan. + * For example, if num_channels = [2, 3] then chan_info will have 5 + * elements, with the first 2 elements from the first scan, and + * the last 3 elements from the second scan. + * wmi_mac_addr old_bssid[num_roam_scans]; bssid we are connected to at the time of roaming + * A_UINT32 is_roaming_success[num_roam_scans]; value is 1 if roaming is successful, 0 if roaming failed + * wmi_mac_addr new_bssid[num_roam_scans]; bssid after roaming + * A_UINT32 num_of_roam_candidates[num_roam_scans]; number of candidates found in each roam scan + * roam_scan_trigger_reason roam_reason[num_roam_scans]; reason for each roam scan + * wmi_mac_addr bssid[]; bssids of candidates in each roam scan + * The num_of_roam_candidates[] elements specify how many elements + * there are within bssid[] for each scan. + * For example, if num_of_roam_candidates = [2, 3] then bssid will + * have 5 elements, with the first 2 elements from the first scan, + * and the last 3 elements from the second scan. + * A_UINT32 score[]; score of candidates in each roam scan + * The num_of_roam_candidates[] elements specify how many elements + * there are within score[] for each scan. + * For example, if num_of_roam_candidates = [2, 3] then score will + * have 5 elements, with the first 2 elements from the first scan, + * and the last 3 elements from the second scan. + * A_UINT32 channel[]; channel frequency (MHz) of candidates in each roam scan + * The num_of_roam_candidates[] elements specify how many elements + * there are within channel[] for each scan. + * For example, if num_of_roam_candidates = [2, 3] then channel will + * have 5 elements, with the first 2 elements from the first scan, + * and the last 3 elements from the second scan. + * A_UINT32 rssi[]; rssi in dB w.r.t. noise floor of candidates + * in each roam scan. + * The num_of_roam_candidates[] elements specify how many elements + * there are within rssi[] for each scan. + * For example, if num_of_roam_candidates = [2, 3] then rssi will + * have 5 elements, with the first 2 elements from the first scan, + * and the last 3 elements from the second scan. + */ +} wmi_roam_scan_stats_event_fixed_param; + /* bit 17-31 of flags is reserved for powersave and WAL */ diff --git a/CORE/SERVICES/COMMON/wmi_version.h b/CORE/SERVICES/COMMON/wmi_version.h index c81d70e5a21d..fe4e85f5afca 100644 --- a/CORE/SERVICES/COMMON/wmi_version.h +++ b/CORE/SERVICES/COMMON/wmi_version.h @@ -36,7 +36,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 511 +#define __WMI_REVISION_ 512 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work diff --git a/CORE/SERVICES/WMI/wmi_unified.c b/CORE/SERVICES/WMI/wmi_unified.c index a2e8574f4a33..ea7d131c270a 100644 --- a/CORE/SERVICES/WMI/wmi_unified.c +++ b/CORE/SERVICES/WMI/wmi_unified.c @@ -786,6 +786,7 @@ static u_int8_t* get_wmi_cmd_string(WMI_CMD_ID wmi_command) CASE_RETURN_STRING(WMI_TWT_PAUSE_DIALOG_CMDID); CASE_RETURN_STRING(WMI_TWT_RESUME_DIALOG_CMDID); CASE_RETURN_STRING(WMI_PEER_RESERVED0_CMDID); + CASE_RETURN_STRING(WMI_REQUEST_ROAM_SCAN_STATS_CMDID); } return "Invalid WMI cmd"; |
