From ff8ae5ae8887b21cbe51d727f40fc930eb11a338 Mon Sep 17 00:00:00 2001 From: Jeffin Mammen Date: Tue, 24 Jul 2018 14:20:08 +0530 Subject: [PATCH] qcacmn: Add WMI command for WMM based ATF config Add new WMI command to support WMM based ATF configuration. The new WMI command sends the Access category ID and the corresponding airtime allocation to the firmware. Change-Id: I7a5fafa6190d779d0fef8982b7b781af54656b19 CRs-Fixed: 2293193 --- wmi_unified_api.h | 32 +++++++++++++++++++++----------- wmi_unified_param.h | 33 ++++++++++++++++++++++++++++++++- wmi_unified_priv.h | 32 +++++++++++++++++++------------- 3 files changed, 72 insertions(+), 25 deletions(-) diff --git a/wmi_unified_api.h b/wmi_unified_api.h index cc0d04f68e..5bfe07e37e 100644 --- a/wmi_unified_api.h +++ b/wmi_unified_api.h @@ -1197,9 +1197,6 @@ QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl, QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl, struct coex_config_params *param); -QDF_STATUS wmi_unified_set_atf_cmd_send(void *wmi_hdl, - struct set_atf_params *param); - QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl, struct fips_params *param); @@ -1496,13 +1493,32 @@ QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl, QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl, struct periodic_chan_stats_params *param); +#ifdef WLAN_ATF_ENABLE +QDF_STATUS +wmi_unified_set_atf_cmd_send(void *wmi_hdl, + struct set_atf_params *param); + QDF_STATUS wmi_send_atf_peer_request_cmd(void *wmi_hdl, - struct atf_peer_request_params *param); + struct atf_peer_request_params *param); QDF_STATUS wmi_send_set_atf_grouping_cmd(void *wmi_hdl, - struct atf_grouping_params *param); + struct atf_grouping_params *param); + +QDF_STATUS +wmi_send_set_atf_group_ac_cmd(void *wmi_hdl, + struct atf_group_ac_params *param); + +QDF_STATUS +wmi_extract_atf_peer_stats_ev(void *wmi_hdl, void *evt_buf, + wmi_host_atf_peer_stats_event *ev); + +QDF_STATUS +wmi_extract_atf_token_info_ev(void *wmi_hdl, void *evt_buf, uint8_t idx, + wmi_host_atf_peer_stats_info *atf_token_info); +#endif + /* Extract APIs */ QDF_STATUS wmi_extract_wds_addr_event(void *wmi_hdl, @@ -1723,12 +1739,6 @@ QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf, QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf, wmi_host_tx_data_traffic_ctrl_event *ev); -QDF_STATUS wmi_extract_atf_peer_stats_ev(void *wmi_hdl, void *evt_buf, - wmi_host_atf_peer_stats_event *ev); - -QDF_STATUS wmi_extract_atf_token_info_ev(void *wmi_hdl, void *evt_buf, - uint8_t idx, wmi_host_atf_peer_stats_info *atf_token_info); - QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf, uint32_t index, wmi_host_vdev_stats *vdev_stats); diff --git a/wmi_unified_param.h b/wmi_unified_param.h index 4b4d130823..0efcf4feeb 100644 --- a/wmi_unified_param.h +++ b/wmi_unified_param.h @@ -4304,6 +4304,32 @@ struct atf_grouping_params { atf_group_info group_info[ATF_ACTIVED_MAX_ATFGROUPS]; }; +/** + * struct atf_group_wmm_ac_info - ATF group AC info params + * @atf_config_ac_be: Relative ATF% for BE traffic + * @atf_config_ac_bk: Relative ATF% for BK traffic + * @atf_config_ac_vi: Relative ATF% for VI traffic + * @atf_config_ac_vo: Relative ATF% for VO traffic + * @reserved: Reserved for future use + */ +struct atf_group_wmm_ac_info { + uint32_t atf_config_ac_be; + uint32_t atf_config_ac_bk; + uint32_t atf_config_ac_vi; + uint32_t atf_config_ac_vo; + uint32_t reserved[2]; +}; + +/** + * struct atf_grp_ac_params - ATF group AC config params + * @num_groups: number of groups + * @group_inf: Group informaition + */ +struct atf_group_ac_params { + uint32_t num_groups; + struct atf_group_wmm_ac_info group_info[ATF_ACTIVED_MAX_ATFGROUPS]; +}; + /** * struct wlan_profile_params - WLAN profile params * @param_id: param id @@ -7475,12 +7501,17 @@ typedef struct { * WMI_INVALID_PEER_AST_INDEX * @vdev_id: only applies if peer_ast_idx == INVALID * @ctrl_cmd: WMI_TX_DATA_TRAFFIC_CTRL_BLOCK or - * WMI_TX_DATA_TRAFFIC_CTRL_UNBLOCK + * WMI_TX_DATA_TRAFFIC_CTRL_UNBLOCK + * @wmm_ac: Indicates AC to be blocked or unblocked + * Bits 4-31 : Reserved (Shall be zero) + * Bits 0-3 : WMM AC NO [ BE (1), BK (2), VI (3), VO (4)] + * Started numbering from 1 to preserve backward compatibility */ typedef struct { uint32_t peer_ast_idx; uint32_t vdev_id; uint32_t ctrl_cmd; + uint32_t wmm_ac; } wmi_host_tx_data_traffic_ctrl_event; enum { diff --git a/wmi_unified_priv.h b/wmi_unified_priv.h index 61b7de09d1..3094382df6 100644 --- a/wmi_unified_priv.h +++ b/wmi_unified_priv.h @@ -835,9 +835,6 @@ QDF_STATUS (*send_pdev_get_tpc_config_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_set_bwf_cmd)(wmi_unified_t wmi_handle, struct set_bwf_params *param); -QDF_STATUS (*send_set_atf_cmd)(wmi_unified_t wmi_handle, - struct set_atf_params *param); - QDF_STATUS (*send_pdev_fips_cmd)(wmi_unified_t wmi_handle, struct fips_params *param); @@ -1098,13 +1095,30 @@ QDF_STATUS (*send_lcr_set_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_periodic_chan_stats_config_cmd)(wmi_unified_t wmi_handle, struct periodic_chan_stats_params *param); +#ifdef WLAN_ATF_ENABLE +QDF_STATUS (*send_set_atf_cmd)(wmi_unified_t wmi_handle, + struct set_atf_params *param); + QDF_STATUS (*send_atf_peer_request_cmd)(wmi_unified_t wmi_handle, - struct atf_peer_request_params *param); + struct atf_peer_request_params *param); QDF_STATUS (*send_set_atf_grouping_cmd)(wmi_unified_t wmi_handle, - struct atf_grouping_params *param); + struct atf_grouping_params *param); + +QDF_STATUS +(*send_set_atf_group_ac_cmd)(wmi_unified_t wmi_handle, + struct atf_group_ac_params *param); + +QDF_STATUS (*extract_atf_peer_stats_ev)(wmi_unified_t wmi_handle, + void *evt_buf, + wmi_host_atf_peer_stats_event *ev); + +QDF_STATUS (*extract_atf_token_info_ev)(wmi_unified_t wmi_handle, + void *evt_buf, uint8_t idx, + wmi_host_atf_peer_stats_info *atf_info); +#endif QDF_STATUS (*send_get_user_position_cmd)(wmi_unified_t wmi_handle, uint32_t value); @@ -1358,14 +1372,6 @@ QDF_STATUS (*extract_inst_rssi_stats_event)(wmi_unified_t wmi_handle, QDF_STATUS (*extract_tx_data_traffic_ctrl_ev)(wmi_unified_t wmi_handle, void *evt_buf, wmi_host_tx_data_traffic_ctrl_event *ev); -QDF_STATUS (*extract_atf_peer_stats_ev)(wmi_unified_t wmi_handle, - void *evt_buf, wmi_host_atf_peer_stats_event *ev); - -QDF_STATUS (*extract_atf_token_info_ev)(wmi_unified_t wmi_handle, - void *evt_buf, - uint8_t idx, - wmi_host_atf_peer_stats_info *atf_token_info); - QDF_STATUS (*extract_vdev_extd_stats)(wmi_unified_t wmi_handle, void *evt_buf, uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats);