mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
Revert "qcacld-3.0: fix ipa mcc tx_desc pool size"
This reverts commit I3216a4c14ac624cc313d11226909efd4f63841d0 When alloccate free Tx desc list, Tx desc pool size is not initialized yet, so tx_desc_size is set to 0. This cause free Tx descriptor allocation failed. Change-Id: I02ae2e59311e737dd9245228048d62f657d5b0d1 CRs-Fixed: 2085753
This commit is contained in:
parent
05e15da676
commit
d9c528eba1
3 changed files with 9 additions and 54 deletions
|
|
@ -7292,34 +7292,6 @@ enum hdd_link_speed_rpt_type {
|
|||
#define CFG_IPA_LOW_BANDWIDTH_MBPS_MAX (100)
|
||||
#define CFG_IPA_LOW_BANDWIDTH_MBPS_DEFAULT (100)
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* gIPAMccTxDescSize - hdd_ipa_tx_desc pool size for MCC TX
|
||||
* @Min: 512
|
||||
* @Max: 4096
|
||||
* @Default: 1024
|
||||
*
|
||||
* This ini is used to specify hdd_ipa_tx_desc pool size for MCC TX path.
|
||||
* The pool is maintained to have a one-to-one mapping with desc from IPA
|
||||
* driver so that when wlan TX completes, wlan driver could replenish the
|
||||
* correct desc to IPA driver. Note that in MCC TX case, desc size is limited
|
||||
* to global tx desc pool size. Therefore the real hdd_ipa_tx_desc pool size
|
||||
* is the minimum of this ini and global tx desc pool size.
|
||||
*
|
||||
*
|
||||
* Related: STA/SAP
|
||||
*
|
||||
* Supported Feature: IPA offload
|
||||
*
|
||||
* Usage: Internal
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_IPA_MCC_TX_DESC_SIZE "gIPAMccTxDescSize"
|
||||
#define CFG_IPA_MCC_TX_DESC_SIZE_MIN (512)
|
||||
#define CFG_IPA_MCC_TX_DESC_SIZE_MAX (4096)
|
||||
#define CFG_IPA_MCC_TX_DESC_SIZE_DEFAULT (1024)
|
||||
|
||||
/*
|
||||
* Firmware uart print
|
||||
*/
|
||||
|
|
@ -13608,7 +13580,6 @@ struct hdd_config {
|
|||
uint32_t IpaHighBandwidthMbps;
|
||||
uint32_t IpaMediumBandwidthMbps;
|
||||
uint32_t IpaLowBandwidthMbps;
|
||||
uint32_t IpaMccTxDescSize;
|
||||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
||||
uint32_t WlanMccToSccSwitchMode;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2771,13 +2771,6 @@ struct reg_table_entry g_registry_table[] = {
|
|||
CFG_IPA_LOW_BANDWIDTH_MBPS_DEFAULT,
|
||||
CFG_IPA_LOW_BANDWIDTH_MBPS_MIN,
|
||||
CFG_IPA_LOW_BANDWIDTH_MBPS_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_IPA_MCC_TX_DESC_SIZE, WLAN_PARAM_Integer,
|
||||
struct hdd_config, IpaMccTxDescSize,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
CFG_IPA_MCC_TX_DESC_SIZE_DEFAULT,
|
||||
CFG_IPA_MCC_TX_DESC_SIZE_MIN,
|
||||
CFG_IPA_MCC_TX_DESC_SIZE_MAX),
|
||||
#endif
|
||||
|
||||
REG_VARIABLE(CFG_VHT_AMPDU_LEN_EXPONENT_NAME, WLAN_PARAM_Integer,
|
||||
|
|
@ -6413,8 +6406,6 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx)
|
|||
hdd_ctx->config->IpaMediumBandwidthMbps);
|
||||
hdd_debug("Name = [IpaLowBandwidthMbps] Value = [%u] ",
|
||||
hdd_ctx->config->IpaLowBandwidthMbps);
|
||||
hdd_info("Name = [IpaMccTxDescSize] Value = [%u] ",
|
||||
hdd_ctx->config->IpaMccTxDescSize);
|
||||
#endif
|
||||
hdd_debug("Name = [gEnableOverLapCh] Value = [%u] ",
|
||||
hdd_ctx->config->gEnableOverLapCh);
|
||||
|
|
|
|||
|
|
@ -439,7 +439,6 @@ struct hdd_ipa_priv {
|
|||
qdf_spinlock_t q_lock;
|
||||
|
||||
struct list_head pend_desc_head;
|
||||
uint16_t tx_desc_size;
|
||||
struct hdd_ipa_tx_desc *tx_desc_list;
|
||||
struct list_head free_tx_desc_head;
|
||||
|
||||
|
|
@ -4527,33 +4526,24 @@ static int hdd_ipa_alloc_tx_desc_list(struct hdd_ipa_priv *hdd_ipa)
|
|||
int i;
|
||||
uint32_t max_desc_cnt;
|
||||
struct hdd_ipa_tx_desc *tmp_desc;
|
||||
struct ol_txrx_pdev_t *pdev;
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
if (!pdev) {
|
||||
HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "pdev is NULL");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
hdd_ipa->tx_desc_size = QDF_MIN(
|
||||
hdd_ipa->hdd_ctx->config->IpaMccTxDescSize,
|
||||
pdev->tx_desc.pool_size);
|
||||
max_desc_cnt = hdd_ipa->hdd_ctx->config->IpaUcTxBufCount;
|
||||
|
||||
INIT_LIST_HEAD(&hdd_ipa->free_tx_desc_head);
|
||||
|
||||
tmp_desc = qdf_mem_malloc(sizeof(struct hdd_ipa_tx_desc) *
|
||||
hdd_ipa->tx_desc_size);
|
||||
max_desc_cnt);
|
||||
|
||||
if (!tmp_desc) {
|
||||
HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,
|
||||
"Free Tx descriptor allocation failed");
|
||||
"Free Tx descriptor allocation failed");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
hdd_ipa->tx_desc_list = tmp_desc;
|
||||
|
||||
qdf_spin_lock_bh(&hdd_ipa->q_lock);
|
||||
for (i = 0; i < hdd_ipa->tx_desc_size; i++) {
|
||||
for (i = 0; i < max_desc_cnt; i++) {
|
||||
tmp_desc->id = i;
|
||||
tmp_desc->ipa_tx_desc_ptr = NULL;
|
||||
list_add_tail(&tmp_desc->link,
|
||||
|
|
@ -4659,7 +4649,7 @@ static int hdd_ipa_setup_sys_pipe(struct hdd_ipa_priv *hdd_ipa)
|
|||
hdd_ipa->sys_pipe[HDD_IPA_RX_PIPE].conn_hdl_valid = 1;
|
||||
}
|
||||
|
||||
/* Allocate free Tx desc list */
|
||||
/* Allocate free Tx desc list */
|
||||
ret = hdd_ipa_alloc_tx_desc_list(hdd_ipa);
|
||||
if (ret)
|
||||
goto setup_sys_pipe_fail;
|
||||
|
|
@ -4686,6 +4676,7 @@ setup_sys_pipe_fail:
|
|||
static void hdd_ipa_teardown_sys_pipe(struct hdd_ipa_priv *hdd_ipa)
|
||||
{
|
||||
int ret = 0, i;
|
||||
uint32_t max_desc_cnt;
|
||||
struct hdd_ipa_tx_desc *tmp_desc;
|
||||
struct ipa_rx_data *ipa_tx_desc;
|
||||
|
||||
|
|
@ -4702,8 +4693,10 @@ static void hdd_ipa_teardown_sys_pipe(struct hdd_ipa_priv *hdd_ipa)
|
|||
}
|
||||
|
||||
if (hdd_ipa->tx_desc_list) {
|
||||
max_desc_cnt = hdd_ipa->hdd_ctx->config->IpaUcTxBufCount;
|
||||
|
||||
qdf_spin_lock_bh(&hdd_ipa->q_lock);
|
||||
for (i = 0; i < hdd_ipa->tx_desc_size; i++) {
|
||||
for (i = 0; i < max_desc_cnt; i++) {
|
||||
tmp_desc = hdd_ipa->tx_desc_list + i;
|
||||
ipa_tx_desc = tmp_desc->ipa_tx_desc_ptr;
|
||||
if (ipa_tx_desc)
|
||||
|
|
|
|||
Loading…
Reference in a new issue