diff --git a/dp/inc/cdp_txrx_stats_struct.h b/dp/inc/cdp_txrx_stats_struct.h index 53f058c255..226b1b4989 100644 --- a/dp/inc/cdp_txrx_stats_struct.h +++ b/dp/inc/cdp_txrx_stats_struct.h @@ -496,6 +496,7 @@ enum _ol_ath_param_t { OL_ATH_PARAM_ACS_SRLOADVAR = 352, OL_ATH_PARAM_MGMT_RSSI_THRESHOLD = 353, OL_ATH_PARAM_EXT_NSS_CAPABLE = 354, + OL_ATH_PARAM_MGMT_PDEV_STATS_TIMER = 355, }; /* Enumeration of PDEV Configuration parameter */ diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h index a67ab1da71..42f22d0d35 100644 --- a/wmi/inc/wmi_unified_api.h +++ b/wmi/inc/wmi_unified_api.h @@ -700,10 +700,6 @@ QDF_STATUS wmi_unified_process_ll_stats_get_cmd (void *wmi_hdl, const struct ll_stats_get_params *get_req, uint8_t addr[IEEE80211_ADDR_LEN]); -QDF_STATUS wmi_unified_get_stats_cmd(void *wmi_hdl, - struct pe_stats_req *get_stats_param, - uint8_t addr[IEEE80211_ADDR_LEN]); - /** * wmi_unified_congestion_request_cmd() - send request to fw to get CCA * @wmi_hdl: wma handle diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 180391b14d..0b74945ad0 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -817,23 +817,17 @@ typedef enum { WMI_HOST_REQUEST_VDEV_EXTD_STAT = 0x100, } wmi_host_stats_id; -typedef struct { - uint16_t cfg_retry_count; - uint16_t retry_count; -} wmi_host_inst_rssi_args; /** * struct stats_request_params - stats_request cmd parameter - * @stats_id: statistics id + * @stats_id: Bit mask of all the STATS request are specified with values from wmi_host_stats_id * @vdev_id: vdev id - * @wmi_host_inst_rssi_args: Instantaneous rssi stats args + * @pdev_id: pdev_id */ struct stats_request_params { uint32_t stats_id; - uint32_t vdev_id; -#ifndef CONFIG_MCL - wmi_host_inst_rssi_args rssi_args; -#endif + uint8_t vdev_id; + uint8_t pdev_id; }; /** @@ -2595,23 +2589,6 @@ struct ll_stats_get_params { uint32_t param_id_mask; }; -/** - * struct pe_stats_req - pe stats parameter - * @msg_type: message type is same as the request type - * @msg_len: length of the entire request - * @sta_id: Per STA stats request must contain valid - * @stats_mask: categories of stats requested - * @session_id: wsm ts spec flag - */ -struct pe_stats_req { - /* Common for all types are requests */ - uint16_t msg_type; - uint16_t msg_len; - uint32_t sta_id; - /* categories of stats requested. look at ePEStatsMask */ - uint32_t stats_mask; - uint8_t session_id; -}; /** * struct link_status_params - link stats parameter diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index 3ba8064e41..cdd64cc8ac 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/wmi/inc/wmi_unified_priv.h @@ -481,9 +481,6 @@ QDF_STATUS (*send_process_ll_stats_get_cmd) (wmi_unified_t wmi_handle, const struct ll_stats_get_params *get_req, uint8_t addr[IEEE80211_ADDR_LEN]); -QDF_STATUS (*send_get_stats_cmd)(wmi_unified_t wmi_handle, - struct pe_stats_req *get_stats_param, - uint8_t addr[IEEE80211_ADDR_LEN]); QDF_STATUS (*send_congestion_cmd)(wmi_unified_t wmi_handle, A_UINT8 vdev_id); diff --git a/wmi/src/wmi_unified_api.c b/wmi/src/wmi_unified_api.c index 943c2de2d3..8fb1e2385b 100644 --- a/wmi/src/wmi_unified_api.c +++ b/wmi/src/wmi_unified_api.c @@ -2053,27 +2053,6 @@ QDF_STATUS wmi_unified_process_ll_stats_get_cmd(void *wmi_hdl, return QDF_STATUS_E_FAILURE; } -/** - * wmi_unified_get_stats_cmd() - get stats request - * @wmi_hdl: wma handle - * @get_stats_param: stats params - * @addr: mac address - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_unified_get_stats_cmd(void *wmi_hdl, - struct pe_stats_req *get_stats_param, - uint8_t addr[IEEE80211_ADDR_LEN]) -{ - wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; - - if (wmi_handle->ops->send_get_stats_cmd) - return wmi_handle->ops->send_get_stats_cmd(wmi_handle, - get_stats_param, addr); - - return QDF_STATUS_E_FAILURE; -} - /** * wmi_unified_congestion_request_cmd() - send request to fw to get CCA * @wmi_hdl: wma handle diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 9b455a5329..ed9cd1f421 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -1575,8 +1575,13 @@ static QDF_STATUS send_stats_request_cmd_tlv(wmi_unified_t wmi_handle, (wmi_request_stats_cmd_fixed_param)); cmd->stats_id = param->stats_id; cmd->vdev_id = param->vdev_id; + cmd->pdev_id = wmi_handle->ops->convert_pdev_id_host_to_target( + param->pdev_id); + WMI_CHAR_ARRAY_TO_MAC_ADDR(macaddr, &cmd->peer_macaddr); ret = wmi_unified_cmd_send(wmi_handle, buf, len, WMI_REQUEST_STATS_CMDID); + WMI_LOGD("STATS REQ STATS_ID:%d VDEV_ID:%d PDEV_ID:%d-->", + cmd->stats_id, cmd->vdev_id, cmd->pdev_id); if (ret) { WMI_LOGE("Failed to send status request to fw =%d", ret); wmi_buf_free(buf); @@ -7972,50 +7977,6 @@ static QDF_STATUS send_process_ll_stats_get_cmd_tlv(wmi_unified_t wmi_handle, return QDF_STATUS_SUCCESS; } -/** - * send_get_stats_cmd_tlv() - get stats request - * @wmi_handle: wmi handle - * @get_stats_param: stats params - * @addr: mac address - * - * Return: CDF status - */ -static QDF_STATUS send_get_stats_cmd_tlv(wmi_unified_t wmi_handle, - struct pe_stats_req *get_stats_param, - uint8_t addr[IEEE80211_ADDR_LEN]) -{ - wmi_buf_t buf; - wmi_request_stats_cmd_fixed_param *cmd; - uint8_t len = sizeof(wmi_request_stats_cmd_fixed_param); - - buf = wmi_buf_alloc(wmi_handle, len); - if (!buf) { - WMI_LOGE("%s: Failed to allocate wmi buffer", __func__); - return QDF_STATUS_E_FAILURE; - } - - - cmd = (wmi_request_stats_cmd_fixed_param *) wmi_buf_data(buf); - WMITLV_SET_HDR(&cmd->tlv_header, - WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param, - WMITLV_GET_STRUCT_TLVLEN - (wmi_request_stats_cmd_fixed_param)); - cmd->stats_id = get_stats_param->stats_mask; - cmd->vdev_id = get_stats_param->session_id; - WMI_CHAR_ARRAY_TO_MAC_ADDR(addr, &cmd->peer_macaddr); - WMI_LOGD("STATS REQ VDEV_ID:%d-->", cmd->vdev_id); - if (wmi_unified_cmd_send(wmi_handle, buf, len, - WMI_REQUEST_STATS_CMDID)) { - - WMI_LOGE("%s: Failed to send WMI_REQUEST_STATS_CMDID", - __func__); - wmi_buf_free(buf); - return QDF_STATUS_E_FAILURE; - } - - return QDF_STATUS_SUCCESS; - -} /** * send_congestion_cmd_tlv() - send request to fw to get CCA @@ -17179,7 +17140,8 @@ static QDF_STATUS extract_all_stats_counts_tlv(wmi_unified_t wmi_handle, stats_param->num_peer_stats = ev->num_peer_stats; stats_param->num_bcnflt_stats = ev->num_bcnflt_stats; stats_param->num_chan_stats = ev->num_chan_stats; - stats_param->pdev_id = 0; + stats_param->pdev_id = wmi_handle->ops->convert_pdev_id_target_to_host( + ev->pdev_id); return QDF_STATUS_SUCCESS; } @@ -19160,7 +19122,6 @@ struct wmi_ops tlv_ops = { .send_process_ll_stats_clear_cmd = send_process_ll_stats_clear_cmd_tlv, .send_process_ll_stats_set_cmd = send_process_ll_stats_set_cmd_tlv, .send_process_ll_stats_get_cmd = send_process_ll_stats_get_cmd_tlv, - .send_get_stats_cmd = send_get_stats_cmd_tlv, .send_congestion_cmd = send_congestion_cmd_tlv, .send_snr_request_cmd = send_snr_request_cmd_tlv, .send_snr_cmd = send_snr_cmd_tlv,