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
This commit is contained in:
Amar Singhal 2019-12-18 10:08:47 -08:00 • committed by nshrivas
commit 4ecd7dbe66
2 changed files with 14 additions and 18 deletions

View file

@ -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);

View file

@ -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,