diff options
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_tlv_defs.h | 15 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_unified.h | 85 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_version.h | 2 | ||||
| -rw-r--r-- | CORE/SERVICES/WMI/wmi_unified.c | 1 |
4 files changed, 102 insertions, 1 deletions
diff --git a/CORE/SERVICES/COMMON/wmi_tlv_defs.h b/CORE/SERVICES/COMMON/wmi_tlv_defs.h index 0705587a9e8b..823deefd36ad 100644 --- a/CORE/SERVICES/COMMON/wmi_tlv_defs.h +++ b/CORE/SERVICES/COMMON/wmi_tlv_defs.h @@ -778,6 +778,9 @@ typedef enum { WMITLV_TAG_STRUC_wmi_11d_scan_start_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_11d_new_country_event_fixed_param, + WMITLV_TAG_STRUC_wmi_request_radio_chan_stats_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_radio_chan_stats, + WMITLV_TAG_STRUC_wmi_radio_chan_stats_event_fixed_param, } WMITLV_TAG_ID; /* @@ -1092,6 +1095,7 @@ typedef enum { OP(WMI_SET_CURRENT_COUNTRY_CMDID) \ OP(WMI_11D_SCAN_START_CMDID) \ OP(WMI_11D_SCAN_STOP_CMDID) \ + OP(WMI_REQUEST_RADIO_CHAN_STATS_CMDID) \ /* add new CMD_LIST elements above this line */ /* @@ -1261,6 +1265,7 @@ typedef enum { OP(WMI_PKGID_EVENTID) \ OP(WMI_REG_CHAN_LIST_CC_EVENTID) \ OP(WMI_11D_NEW_COUNTRY_EVENTID) \ + OP(WMI_RADIO_CHAN_STATS_EVENTID) \ /* add new EVT_LIST elements above this line */ @@ -3132,6 +3137,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_11D_SCAN_START_CMDID); WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param, wmi_11d_scan_stop_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_11D_SCAN_STOP_CMDID); +/* Request radio channel stats cmd */ +#define WMITLV_TABLE_WMI_REQUEST_RADIO_CHAN_STATS_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_request_radio_chan_stats_cmd_fixed_param, wmi_request_radio_chan_stats_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_REQUEST_RADIO_CHAN_STATS_CMDID); + /************************** TLV definitions of WMI events *******************************/ /* Service Ready event */ @@ -4167,6 +4177,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID); WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_STRUC, wmi_peer_stats_info, peer_stats_info, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_PEER_STATS_INFO_EVENTID); +#define WMITLV_TABLE_WMI_RADIO_CHAN_STATS_EVENTID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_radio_chan_stats_event_fixed_param,wmi_radio_chan_stats_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_STRUC, wmi_radio_chan_stats, radio_chan_stats, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_RADIO_CHAN_STATS_EVENTID); + #define WMITLV_TABLE_WMI_PKGID_EVENTID(id, op, buf, len) \ WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_pkgid_event_fixed_param, wmi_pkgid_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_PKGID_EVENTID); diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h index 84eb0728c04b..72f76ac14d8a 100644 --- a/CORE/SERVICES/COMMON/wmi_unified.h +++ b/CORE/SERVICES/COMMON/wmi_unified.h @@ -713,6 +713,8 @@ typedef enum { /** One time request for peer stats info */ WMI_REQUEST_PEER_STATS_INFO_CMDID, + /** One time request for radio channel stats */ + WMI_REQUEST_RADIO_CHAN_STATS_CMDID, /** ARP OFFLOAD REQUEST*/ WMI_SET_ARP_NS_OFFLOAD_CMDID=WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL), @@ -1263,6 +1265,10 @@ typedef enum { * and report peer stats info to host */ WMI_PEER_STATS_INFO_EVENTID, + /** This event is used to respond to WMI_REQUEST_RADIO_CHAN_STATS_CMDID + * and report radio channel stats to host */ + WMI_RADIO_CHAN_STATS_EVENTID, + /* NLO specific events */ /** NLO match event after the first match */ WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL), @@ -3919,6 +3925,16 @@ typedef enum { */ WMI_PDEV_PARAM_FAST_PWR_TRANSITION, + /** Enable/disable radio channel stats mechanism + * A zero value disables; a non-zero value enables. + */ + WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE, + /** Enable/disable radio diagnosis feature + * which allows retrieving the status of radio. + * A zero value disables; a non-zero value enables. + */ + WMI_PDEV_PARAM_RADIO_DIAGNOSIS_ENABLE, + } WMI_PDEV_PARAM; typedef enum { @@ -5462,6 +5478,48 @@ typedef struct { */ } wmi_peer_stats_info_event_fixed_param; +typedef struct { + /** TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_radio_chan_stats */ + A_UINT32 tlv_header; + /** primary channel freq of the channel whose stats is sent */ + A_UINT32 chan_mhz; + /** accumulation of time the radio is tuned to this channel, + * in units of microseconds */ + A_UINT32 on_chan_us; + /** accumulation of the TX PPDU duration over the measurement period, + * in units of microseconds */ + A_UINT32 tx_duration_us; + /** accumulation of the RX PPDU duration over the measurement period, + * in units of microseconds */ + A_UINT32 rx_duration_us; + /** ratio of channel busy time to on_chan_us, in units of percent */ + A_UINT32 chan_busy_ratio; + /** ratio of on_chan_us to the measurement period, in units of percent */ + A_UINT32 on_chan_ratio; + /** measurement period, in units of microseconds */ + A_UINT32 measurement_period_us; + /** MPDUs transmitted on this channel */ + A_UINT32 tx_mpdus; + /** MSDUs transmitted on this channel */ + A_UINT32 tx_msdus; + /** MPDUS successfully received on this channel */ + A_UINT32 rx_succ_mpdus; + /** Failed MPDUs (CRC failures) received on this channel */ + A_UINT32 rx_fail_mpdus; +} wmi_radio_chan_stats; + +typedef struct { + /** TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_radio_chan_stats_event_fixed_param */ + A_UINT32 tlv_header; + /** number of channel stats in radio_chan_stats[] */ + A_UINT32 num_chans; + /* This TLV is followed by another TLV of array of structs + * wmi_radio_chan_stats radio_chan_stats[]; + */ +} wmi_radio_chan_stats_event_fixed_param; + /** * PDEV statistics * @todo @@ -16801,6 +16859,31 @@ typedef struct { } wmi_request_peer_stats_info_cmd_fixed_param; typedef enum { + WMI_REQUEST_ONE_RADIO_CHAN_STATS = 0x01, /* request stats of one specified channel */ + WMI_REQUEST_ALL_RADIO_CHAN_STATS = 0x02, /* request stats of all channels */ +} wmi_radio_chan_stats_request_type; + +/** It is required to issue WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE + * (with a non-zero value) before issuing the first REQUEST_RADIO_CHAN_STATS. + */ +typedef struct { + /** TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_request_radio_chan_stats_cmd_fixed_param */ + A_UINT32 tlv_header; + /** request_type to indicate if only stats of + * one channel or all channels are requested, + * see wmi_radio_chan_stats_request_type. + */ + A_UINT32 request_type; + /** Frequency of channel whose stats is requested, + * only used when request_type == WMI_REQUEST_ONE_RADIO_CHAN_STATS + */ + A_UINT32 chan_mhz; + /** flag to indicate if FW needs to reset requested stats of specified channel/channels */ + A_UINT32 reset_after_request; +} wmi_request_radio_chan_stats_cmd_fixed_param; + +typedef enum { WLAN_2G_CAPABILITY = 0x1, WLAN_5G_CAPABILITY = 0x2, } WLAN_BAND_CAPABILITY; @@ -17615,6 +17698,8 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command) WMI_RETURN_STRING(WMI_PDEV_SET_STATS_THRESHOLD_CMDID); WMI_RETURN_STRING(WMI_REQUEST_WLAN_STATS_CMDID); WMI_RETURN_STRING(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID); + WMI_RETURN_STRING(WMI_REQUEST_PEER_STATS_INFO_CMDID); + WMI_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID); } return "Invalid WMI cmd"; diff --git a/CORE/SERVICES/COMMON/wmi_version.h b/CORE/SERVICES/COMMON/wmi_version.h index 505574010171..e8f41ba07f07 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_ 329 +#define __WMI_REVISION_ 330 /** 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 14d7cbe0cb5e..efaa7d84fd1d 100644 --- a/CORE/SERVICES/WMI/wmi_unified.c +++ b/CORE/SERVICES/WMI/wmi_unified.c @@ -730,6 +730,7 @@ static u_int8_t* get_wmi_cmd_string(WMI_CMD_ID wmi_command) CASE_RETURN_STRING(WMI_SET_CURRENT_COUNTRY_CMDID); CASE_RETURN_STRING(WMI_11D_SCAN_START_CMDID); CASE_RETURN_STRING(WMI_11D_SCAN_STOP_CMDID); + CASE_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID); } return "Invalid WMI cmd"; } |
