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:
@@ -7292,34 +7292,6 @@ enum hdd_link_speed_rpt_type {
|
|||||||
#define CFG_IPA_LOW_BANDWIDTH_MBPS_MAX (100)
|
#define CFG_IPA_LOW_BANDWIDTH_MBPS_MAX (100)
|
||||||
#define CFG_IPA_LOW_BANDWIDTH_MBPS_DEFAULT (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
|
* Firmware uart print
|
||||||
*/
|
*/
|
||||||
@@ -13608,7 +13580,6 @@ struct hdd_config {
|
|||||||
uint32_t IpaHighBandwidthMbps;
|
uint32_t IpaHighBandwidthMbps;
|
||||||
uint32_t IpaMediumBandwidthMbps;
|
uint32_t IpaMediumBandwidthMbps;
|
||||||
uint32_t IpaLowBandwidthMbps;
|
uint32_t IpaLowBandwidthMbps;
|
||||||
uint32_t IpaMccTxDescSize;
|
|
||||||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
||||||
uint32_t WlanMccToSccSwitchMode;
|
uint32_t WlanMccToSccSwitchMode;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -2771,13 +2771,6 @@ struct reg_table_entry g_registry_table[] = {
|
|||||||
CFG_IPA_LOW_BANDWIDTH_MBPS_DEFAULT,
|
CFG_IPA_LOW_BANDWIDTH_MBPS_DEFAULT,
|
||||||
CFG_IPA_LOW_BANDWIDTH_MBPS_MIN,
|
CFG_IPA_LOW_BANDWIDTH_MBPS_MIN,
|
||||||
CFG_IPA_LOW_BANDWIDTH_MBPS_MAX),
|
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
|
#endif
|
||||||
|
|
||||||
REG_VARIABLE(CFG_VHT_AMPDU_LEN_EXPONENT_NAME, WLAN_PARAM_Integer,
|
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_ctx->config->IpaMediumBandwidthMbps);
|
||||||
hdd_debug("Name = [IpaLowBandwidthMbps] Value = [%u] ",
|
hdd_debug("Name = [IpaLowBandwidthMbps] Value = [%u] ",
|
||||||
hdd_ctx->config->IpaLowBandwidthMbps);
|
hdd_ctx->config->IpaLowBandwidthMbps);
|
||||||
hdd_info("Name = [IpaMccTxDescSize] Value = [%u] ",
|
|
||||||
hdd_ctx->config->IpaMccTxDescSize);
|
|
||||||
#endif
|
#endif
|
||||||
hdd_debug("Name = [gEnableOverLapCh] Value = [%u] ",
|
hdd_debug("Name = [gEnableOverLapCh] Value = [%u] ",
|
||||||
hdd_ctx->config->gEnableOverLapCh);
|
hdd_ctx->config->gEnableOverLapCh);
|
||||||
|
@@ -439,7 +439,6 @@ struct hdd_ipa_priv {
|
|||||||
qdf_spinlock_t q_lock;
|
qdf_spinlock_t q_lock;
|
||||||
|
|
||||||
struct list_head pend_desc_head;
|
struct list_head pend_desc_head;
|
||||||
uint16_t tx_desc_size;
|
|
||||||
struct hdd_ipa_tx_desc *tx_desc_list;
|
struct hdd_ipa_tx_desc *tx_desc_list;
|
||||||
struct list_head free_tx_desc_head;
|
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;
|
int i;
|
||||||
uint32_t max_desc_cnt;
|
uint32_t max_desc_cnt;
|
||||||
struct hdd_ipa_tx_desc *tmp_desc;
|
struct hdd_ipa_tx_desc *tmp_desc;
|
||||||
struct ol_txrx_pdev_t *pdev;
|
|
||||||
|
|
||||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
max_desc_cnt = hdd_ipa->hdd_ctx->config->IpaUcTxBufCount;
|
||||||
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);
|
|
||||||
|
|
||||||
INIT_LIST_HEAD(&hdd_ipa->free_tx_desc_head);
|
INIT_LIST_HEAD(&hdd_ipa->free_tx_desc_head);
|
||||||
|
|
||||||
tmp_desc = qdf_mem_malloc(sizeof(struct hdd_ipa_tx_desc) *
|
tmp_desc = qdf_mem_malloc(sizeof(struct hdd_ipa_tx_desc) *
|
||||||
hdd_ipa->tx_desc_size);
|
max_desc_cnt);
|
||||||
|
|
||||||
if (!tmp_desc) {
|
if (!tmp_desc) {
|
||||||
HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,
|
HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,
|
||||||
"Free Tx descriptor allocation failed");
|
"Free Tx descriptor allocation failed");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
hdd_ipa->tx_desc_list = tmp_desc;
|
hdd_ipa->tx_desc_list = tmp_desc;
|
||||||
|
|
||||||
qdf_spin_lock_bh(&hdd_ipa->q_lock);
|
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->id = i;
|
||||||
tmp_desc->ipa_tx_desc_ptr = NULL;
|
tmp_desc->ipa_tx_desc_ptr = NULL;
|
||||||
list_add_tail(&tmp_desc->link,
|
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;
|
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);
|
ret = hdd_ipa_alloc_tx_desc_list(hdd_ipa);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto setup_sys_pipe_fail;
|
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)
|
static void hdd_ipa_teardown_sys_pipe(struct hdd_ipa_priv *hdd_ipa)
|
||||||
{
|
{
|
||||||
int ret = 0, i;
|
int ret = 0, i;
|
||||||
|
uint32_t max_desc_cnt;
|
||||||
struct hdd_ipa_tx_desc *tmp_desc;
|
struct hdd_ipa_tx_desc *tmp_desc;
|
||||||
struct ipa_rx_data *ipa_tx_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) {
|
if (hdd_ipa->tx_desc_list) {
|
||||||
|
max_desc_cnt = hdd_ipa->hdd_ctx->config->IpaUcTxBufCount;
|
||||||
|
|
||||||
qdf_spin_lock_bh(&hdd_ipa->q_lock);
|
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;
|
tmp_desc = hdd_ipa->tx_desc_list + i;
|
||||||
ipa_tx_desc = tmp_desc->ipa_tx_desc_ptr;
|
ipa_tx_desc = tmp_desc->ipa_tx_desc_ptr;
|
||||||
if (ipa_tx_desc)
|
if (ipa_tx_desc)
|
||||||
|
Reference in New Issue
Block a user