From 4ecd7dbe66bf0cc93ad0736ef6668c0c33506b39 Mon Sep 17 00:00:00 2001 From: Amar Singhal Date: Wed, 18 Dec 2019 10:08:47 -0800 Subject: [PATCH] qcacld-3.0: Send max AMSDU size to firmware Firmware needs maximum amsdu size for through-put optimization. Send host configured amsdu size to firmware when vdev is created. Change-Id: Ib292c6d9ddc828d5d0a02cf8f6d9a577c8a5c01a CRs-Fixed: 2573857 --- core/hdd/src/wlan_hdd_main.c | 19 +------------------ core/wma/src/wma_dev_if.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 47737c39151e..10bb057e74ad 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -5143,7 +5143,7 @@ int hdd_set_fw_params(struct hdd_adapter *adapter) QDF_STATUS status; struct hdd_context *hdd_ctx; bool bval = false; - uint8_t max_amsdu_len, enable_tx_sch_delay; + uint8_t enable_tx_sch_delay; uint32_t dtim_sel_diversity, enable_secondary_rate; hdd_enter_dev(adapter->dev); @@ -5297,23 +5297,6 @@ int hdd_set_fw_params(struct hdd_adapter *adapter) goto error; } - status = ucfg_mlme_get_max_amsdu_num(hdd_ctx->psoc, &max_amsdu_len); - if (QDF_IS_STATUS_ERROR(status)) { - hdd_err("Failed to get Max AMSDU Num"); - goto error; - } - - hdd_debug("SET AMSDU num %d", max_amsdu_len); - - ret = wma_cli_set_command(adapter->vdev_id, - GEN_VDEV_PARAM_AMSDU, - max_amsdu_len, - GEN_CMD); - if (ret != 0) { - hdd_err("GEN_VDEV_PARAM_AMSDU set failed %d", ret); - goto error; - } - hdd_set_fw_log_params(hdd_ctx, adapter); ret = hdd_send_coex_config_params(hdd_ctx, adapter); diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index ecc177e118a5..c20938861251 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -2591,6 +2591,7 @@ QDF_STATUS wma_post_vdev_create_setup(struct wlan_objmgr_vdev *vdev) struct wlan_mlme_qos *qos_aggr; struct vdev_mlme_obj *vdev_mlme; tp_wma_handle wma_handle; + uint8_t amsdu_val; if (!mac) { WMA_LOGE("%s: Failed to get mac", __func__); @@ -2643,6 +2644,18 @@ QDF_STATUS wma_post_vdev_create_setup(struct wlan_objmgr_vdev *vdev) WMA_LOGE("failed to set aggregation sizes(status = %d)", status); + status = wlan_mlme_get_max_amsdu_num(wma_handle->psoc, &amsdu_val); + if (QDF_IS_STATUS_ERROR(status)) { + WMA_LOGE("failed to get amsdu aggr.size %d", status); + } else { + status = wma_set_tx_rx_aggr_size(vdev_id, amsdu_val, + amsdu_val, + WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU); + if (QDF_IS_STATUS_ERROR(status)) { + WMA_LOGE("failed to set amsdu aggr.size %d", status); + } + } + if (vdev_mlme->mgmt.generic.type == WMI_VDEV_TYPE_STA) { status = wma_set_tx_rx_aggr_size_per_ac( wma_handle, vdev_id,