From 8e619bccc3c2e69390da9c0ff264db6391f15a25 Mon Sep 17 00:00:00 2001 From: Qun Zhang Date: Tue, 27 Aug 2019 16:31:49 +0800 Subject: [PATCH] qcacld-3.0: Add INI to configure SIFS burst mode To pass WFA 11N 4.2.25 case, it's needed to enable legacy mode SIFS burst. So add INI to make SIFS burst mode configurable. Change-Id: I740fe33a7ae0d9b558aa3b3aeee434f482ed24cb CRs-Fixed: 2486171 --- fw_offload/core/inc/wlan_fw_offload_main.h | 2 ++ fw_offload/core/src/wlan_fw_offload_main.c | 1 + fw_offload/dispatcher/inc/cfg_fwol_generic.h | 33 +++++++++++++++++++ .../dispatcher/inc/wlan_fwol_ucfg_api.h | 10 ++++++ .../dispatcher/src/wlan_fwol_ucfg_api.c | 15 +++++++++ 5 files changed, 61 insertions(+) diff --git a/fw_offload/core/inc/wlan_fw_offload_main.h b/fw_offload/core/inc/wlan_fw_offload_main.h index 0df43d7e4c..365b53d542 100644 --- a/fw_offload/core/inc/wlan_fw_offload_main.h +++ b/fw_offload/core/inc/wlan_fw_offload_main.h @@ -162,6 +162,7 @@ struct wlan_fwol_neighbor_report_cfg { * @neighbor_report_cfg: 11K neighbor report config * @ani_enabled: ANI enable/disable * @enable_rts_sifsbursting: Enable RTS SIFS Bursting + * @enable_sifs_burst: Enable SIFS burst * @max_mpdus_inampdu: Max number of MPDUS * @arp_ac_category: ARP AC category * @enable_phy_reg_retention: Enable PHY reg retention @@ -197,6 +198,7 @@ struct wlan_fwol_cfg { struct wlan_fwol_neighbor_report_cfg neighbor_report_cfg; bool ani_enabled; bool enable_rts_sifsbursting; + uint8_t enable_sifs_burst; uint8_t max_mpdus_inampdu; uint32_t arp_ac_category; uint8_t enable_phy_reg_retention; diff --git a/fw_offload/core/src/wlan_fw_offload_main.c b/fw_offload/core/src/wlan_fw_offload_main.c index f82b267dc7..1e1f79c3db 100644 --- a/fw_offload/core/src/wlan_fw_offload_main.c +++ b/fw_offload/core/src/wlan_fw_offload_main.c @@ -500,6 +500,7 @@ QDF_STATUS fwol_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc) fwol_cfg->ani_enabled = cfg_get(psoc, CFG_ENABLE_ANI); fwol_cfg->enable_rts_sifsbursting = cfg_get(psoc, CFG_SET_RTS_FOR_SIFS_BURSTING); + fwol_cfg->enable_sifs_burst = cfg_get(psoc, CFG_SET_SIFS_BURST); fwol_cfg->max_mpdus_inampdu = cfg_get(psoc, CFG_MAX_MPDUS_IN_AMPDU); fwol_cfg->arp_ac_category = cfg_get(psoc, CFG_ARP_AC_CATEGORY); fwol_cfg->enable_phy_reg_retention = cfg_get(psoc, CFG_ENABLE_PHY_REG); diff --git a/fw_offload/dispatcher/inc/cfg_fwol_generic.h b/fw_offload/dispatcher/inc/cfg_fwol_generic.h index 6bd48e3d1c..0bf8ee0c5d 100644 --- a/fw_offload/dispatcher/inc/cfg_fwol_generic.h +++ b/fw_offload/dispatcher/inc/cfg_fwol_generic.h @@ -65,6 +65,38 @@ 0, \ "Set rts for sifs bursting") +/* + * + * sifs_burst_mask - Set sifs burst mask + * @Min: 0 + * @Max: 3 + * @Default: 1 + * + * This ini is used to set 11n and legacy(non 11n/wmm) + * sifs burst. Especially under running multi stream + * traffic test case, it can be useful to let the low + * priority AC, or legacy mode device, or the specified + * AC to aggressively contend air medium, then have a + * obvious improvement of throughput. Bit0 is the switch + * of sifs burst, it must be set if want to enable sifs + * burst, Bit1 is for legacy mode. + * Supported configuration: + * 0: disabled + * 1: enabled, but disabled for legacy mode + * 3: all enabled + * + * Usage: External + * + * + */ +#define CFG_SET_SIFS_BURST CFG_INI_UINT( \ + "sifs_burst_mask", \ + 0, \ + 3, \ + 1, \ + CFG_VALUE_OR_DEFAULT, \ + "Set SIFS burst mask") + /* * * gMaxMPDUsInAMPDU - max mpdus in ampdu @@ -706,6 +738,7 @@ CFG_FWOL_DHCP \ CFG(CFG_ENABLE_ANI) \ CFG(CFG_SET_RTS_FOR_SIFS_BURSTING) \ + CFG(CFG_SET_SIFS_BURST) \ CFG(CFG_MAX_MPDUS_IN_AMPDU) \ CFG(CFG_ARP_AC_CATEGORY) \ CFG(CFG_ENABLE_PHY_REG) \ diff --git a/fw_offload/dispatcher/inc/wlan_fwol_ucfg_api.h b/fw_offload/dispatcher/inc/wlan_fwol_ucfg_api.h index 968efd16ed..bccd02a08c 100644 --- a/fw_offload/dispatcher/inc/wlan_fwol_ucfg_api.h +++ b/fw_offload/dispatcher/inc/wlan_fwol_ucfg_api.h @@ -158,6 +158,16 @@ QDF_STATUS ucfg_fwol_get_ani_enabled(struct wlan_objmgr_psoc *psoc, QDF_STATUS ucfg_get_enable_rts_sifsbursting(struct wlan_objmgr_psoc *psoc, bool *enable_rts_sifsbursting); +/** + * ucfg_get_enable_sifs_burst() - Get the enable_sifs_burst value + * @psoc: pointer to the psoc object + * @enable_sifs_burst: pointer to return enable_sifs_burst value + * + * Return: QDF Status + */ +QDF_STATUS ucfg_get_enable_sifs_burst(struct wlan_objmgr_psoc *psoc, + uint8_t *enable_sifs_burst); + /** * ucfg_get_max_mpdus_inampdu() - Assigns the max_mpdus_inampdu value * @psoc: pointer to the psoc object diff --git a/fw_offload/dispatcher/src/wlan_fwol_ucfg_api.c b/fw_offload/dispatcher/src/wlan_fwol_ucfg_api.c index 8a96f8db11..019fb5f9b6 100644 --- a/fw_offload/dispatcher/src/wlan_fwol_ucfg_api.c +++ b/fw_offload/dispatcher/src/wlan_fwol_ucfg_api.c @@ -290,6 +290,21 @@ QDF_STATUS ucfg_get_enable_rts_sifsbursting(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_SUCCESS; } +QDF_STATUS ucfg_get_enable_sifs_burst(struct wlan_objmgr_psoc *psoc, + uint8_t *enable_sifs_burst) +{ + struct wlan_fwol_psoc_obj *fwol_obj; + + fwol_obj = fwol_get_psoc_obj(psoc); + if (!fwol_obj) { + fwol_err("Failed to get FWOL obj"); + return QDF_STATUS_E_FAILURE; + } + + *enable_sifs_burst = fwol_obj->cfg.enable_sifs_burst; + return QDF_STATUS_SUCCESS; +} + QDF_STATUS ucfg_get_max_mpdus_inampdu(struct wlan_objmgr_psoc *psoc, uint8_t *max_mpdus_inampdu) {