From 037f0d9a3fa86337c75764b29606bbb9a941b595 Mon Sep 17 00:00:00 2001 From: Vulupala Shashank Reddy Date: Tue, 19 Jan 2021 23:04:46 -0800 Subject: [PATCH] qcacld-3.0: Config support for WMM based TXOP feature Add configuration support for WMM based TXOP feature. Change-Id: Ide52b7d4b7bca590515e8697506d2b52744a7fa6 CRs-Fixed: 2947604 --- components/mlme/core/src/wlan_mlme_main.c | 2 ++ .../dispatcher/inc/cfg_mlme_edca_params.h | 24 +++++++++++++++++++ .../dispatcher/inc/wlan_mlme_public_struct.h | 1 + core/wma/src/wma_dev_if.c | 10 ++++++++ 4 files changed, 37 insertions(+) diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index 3af2f88ad195..929a936c5d14 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -667,6 +667,8 @@ mlme_init_qos_edca_params(struct wlan_objmgr_psoc *psoc, edca_params->enable_edca_params = cfg_get(psoc, CFG_EDCA_ENABLE_PARAM); + edca_params->enable_wmm_txop = + cfg_get(psoc, CFG_ENABLE_WMM_TXOP); edca_params->edca_ac_vo.vo_cwmin = cfg_get(psoc, CFG_EDCA_VO_CWMIN); edca_params->edca_ac_vo.vo_cwmax = diff --git a/components/mlme/dispatcher/inc/cfg_mlme_edca_params.h b/components/mlme/dispatcher/inc/cfg_mlme_edca_params.h index b9d0801d509f..14ab0046367c 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_edca_params.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_edca_params.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -481,6 +482,28 @@ 0, \ "Enable edca parameter") +/* + * + * enable_wmm_txop - Enable WMM based txop feature + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini is used to enable/disable the WMM based txop feature in FW + * + * Related: None + * + * Supported Feature: STA + * + * Usage: Internal + * + * + */ +#define CFG_ENABLE_WMM_TXOP CFG_INI_BOOL( \ + "enable_wmm_txop", \ + 1, \ + "Enable WMM TXOP") + /* * * gEdcaVoCwmin - Set Cwmin value for QCA_WLAN_AC_VO @@ -838,6 +861,7 @@ CFG(CFG_EDCA_BK_AIFS) \ CFG(CFG_EDCA_BE_CWMIN) \ CFG(CFG_EDCA_BE_CWMAX) \ + CFG(CFG_ENABLE_WMM_TXOP) \ CFG(CFG_EDCA_BE_AIFS) #endif /* __CFG_MLME_EDCA__PARAM_H */ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 48d648184f6b..328d3edf40f4 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -376,6 +376,7 @@ struct wlan_mlme_edca_params { struct mlme_cfg_str etsi_acvo_b; bool enable_edca_params; + bool enable_wmm_txop; struct mlme_edca_ac_vo edca_ac_vo; struct mlme_edca_ac_vi edca_ac_vi; struct mlme_edca_ac_bk edca_ac_bk; diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 68da62cca50f..507fd43a2967 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -2538,6 +2538,16 @@ QDF_STATUS wma_post_vdev_create_setup(struct wlan_objmgr_vdev *vdev) status); } + wma_debug("Setting WMI_VDEV_PARAM_WMM_TXOP_ENABLE: %d", + mac->mlme_cfg->edca_params.enable_wmm_txop); + + status = wma_vdev_set_param(wma_handle->wmi_handle, vdev_id, + WMI_VDEV_PARAM_WMM_TXOP_ENABLE, + mac->mlme_cfg->edca_params.enable_wmm_txop); + + if (QDF_IS_STATUS_ERROR(status)) + wma_err("failed to set WMM TXOP (status = %d)", status); + wma_debug("Setting WMI_VDEV_PARAM_DISCONNECT_TH: %d", mac->mlme_cfg->gen.dropped_pkt_disconnect_thresh); status = wma_vdev_set_param(