mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
qcacld-3.0: set msdu/mpdu aggr size for each vdev start
The global aggregation size is only set to firmware once when vdev is created. And the size may be modified dynamically for a specified AP during association, according to the OUI based aggregation size configured by ini 'cfg_tx_iot_aggr'. If global AMSDU size is 0, considering the case as below: 1. connect to AP-1 which is included in 'cfg_tx_iot_aggr', the AMSDU size will be set to the specifed value. 2. connect to AP-2 which is NOT in 'cfg_tx_iot_aggr', it doesn't reset the AMSDU size to 0, and firmware is still using the value set in step #1, it's wrong. To fix this issue, set the global size for each vdev start, as init values for each connection. Change-Id: I790d580fc5762e6816e840ba5484b3cd758334df CRs-Fixed: 2918046
This commit is contained in:
parent
0aa920ec8a
commit
6a9129e9ea
2 changed files with 32 additions and 29 deletions
|
|
@ -2425,10 +2425,11 @@ mlme_iot_parse_aggr_info(struct wlan_objmgr_psoc *psoc,
|
|||
|
||||
aggr_info_list = iot->aggr;
|
||||
qdf_mem_copy(aggr_info, cfg_str, cfg_str_len);
|
||||
mlme_legacy_debug("aggr_info=[%s]", aggr_info);
|
||||
|
||||
aggr_info_temp = aggr_info;
|
||||
while (aggr_info_temp) {
|
||||
/* skip possible spaces before oui string */
|
||||
mlme_legacy_err("aggr_info=[%s]", aggr_info_temp);
|
||||
while (*aggr_info_temp == ' ')
|
||||
aggr_info_temp++;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 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
|
||||
|
|
@ -2460,7 +2461,6 @@ 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_err("Failed to get mac");
|
||||
|
|
@ -2500,34 +2500,7 @@ QDF_STATUS wma_post_vdev_create_setup(struct wlan_objmgr_vdev *vdev)
|
|||
vdev_mlme->mgmt.generic.subtype;
|
||||
|
||||
qos_aggr = &mac->mlme_cfg->qos_mlme_params;
|
||||
status = wma_set_tx_rx_aggr_size(vdev_id, qos_aggr->tx_aggregation_size,
|
||||
qos_aggr->rx_aggregation_size,
|
||||
WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
wma_err("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_err("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_err("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,
|
||||
qos_aggr,
|
||||
WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU);
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
wma_err("failed to set aggr size per ac(status = %d)",
|
||||
status);
|
||||
|
||||
wma_set_sta_keep_alive(
|
||||
wma_handle, vdev_id,
|
||||
SIR_KEEP_ALIVE_NULL_PKT,
|
||||
|
|
@ -2763,6 +2736,8 @@ QDF_STATUS wma_vdev_pre_start(uint8_t vdev_id, bool restart)
|
|||
struct wlan_channel *des_chan;
|
||||
QDF_STATUS status;
|
||||
uint8_t btc_chain_mode;
|
||||
struct wlan_mlme_qos *qos_aggr;
|
||||
uint8_t amsdu_val;
|
||||
|
||||
if (!wma) {
|
||||
wma_err("Invalid wma handle");
|
||||
|
|
@ -2875,6 +2850,33 @@ QDF_STATUS wma_vdev_pre_start(uint8_t vdev_id, bool restart)
|
|||
}
|
||||
}
|
||||
|
||||
qos_aggr = &mac_ctx->mlme_cfg->qos_mlme_params;
|
||||
status = wma_set_tx_rx_aggr_size(vdev_id, qos_aggr->tx_aggregation_size,
|
||||
qos_aggr->rx_aggregation_size,
|
||||
WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
wma_err("failed to set aggregation sizes(status = %d)", status);
|
||||
|
||||
status = wlan_mlme_get_max_amsdu_num(wma->psoc, &amsdu_val);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
wma_err("failed to get amsdu aggr.size(status = %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_err("failed to set amsdu aggr.size(status = %d)",
|
||||
status);
|
||||
}
|
||||
|
||||
if (mlme_obj->mgmt.generic.type == WMI_VDEV_TYPE_STA) {
|
||||
status = wma_set_tx_rx_aggr_size_per_ac(wma, vdev_id, qos_aggr,
|
||||
WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU);
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
wma_err("failed to set aggr size per ac(status = %d)",
|
||||
status);
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue