summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYun Park <yunp@qca.qualcomm.com>2014-03-20 13:44:40 -0700
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-03-21 22:57:05 -0700
commitc6366e4b700d38b5ccc1eb309adf3397c178e8b6 (patch)
tree2fc4cecd13788ddf41d24f7f0a9ee7c4b210f415
parentba68a0a653f4c3bf90032ddbb3c326609d424c99 (diff)
qcacld: ipa: Add one additional descriptor in IPA TX pipe descriptor FIFO
The maximum number of descriptors that can be provided to a BAM at once is one less than the total number of descriptors that the buffer can contain. Because of that reason, one extra descriptor will be added to make sure hardware always has one descriptor. Change-Id: Ib7869c16677a2c515a66a2a3d7c19820258b2aa4 CRs-fixed: 635223
-rw-r--r--CORE/HDD/src/wlan_hdd_ipa.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/CORE/HDD/src/wlan_hdd_ipa.c b/CORE/HDD/src/wlan_hdd_ipa.c
index 6d0aa84458e3..a198040111e3 100644
--- a/CORE/HDD/src/wlan_hdd_ipa.c
+++ b/CORE/HDD/src/wlan_hdd_ipa.c
@@ -912,13 +912,26 @@ static int hdd_ipa_setup_sys_pipe(struct hdd_ipa_priv *hdd_ipa)
{
int i, ret = 0;
struct ipa_sys_connect_params *ipa;
+ uint32_t desc_fifo_sz;
+
+ /* The maximum number of descriptors that can be provided to a BAM at
+ * once is one less than the total number of descriptors that the buffer
+ * can contain.
+ * If max_num_of_descriptors = (BAM_PIPE_DESCRIPTOR_FIFO_SIZE / sizeof
+ * (SPS_DESCRIPTOR)), then (max_num_of_descriptors - 1) descriptors can
+ * be provided at once.
+ * Because of above requirement, one extra descriptor will be added to
+ * make sure hardware always has one descriptor.
+ */
+ desc_fifo_sz = hdd_ipa->hdd_ctx->cfg_ini->IpaDescSize
+ + sizeof(struct sps_iovec);
/*setup TX pipes */
for (i = 0; i < HDD_IPA_MAX_IFACE; i++) {
ipa = &hdd_ipa->sys_pipe[i].ipa_sys_params;
ipa->client = hdd_ipa_adapter_2_client[i].cons_client;
- ipa->desc_fifo_sz = hdd_ipa->hdd_ctx->cfg_ini->IpaDescSize;
+ ipa->desc_fifo_sz = desc_fifo_sz;
ipa->priv = &hdd_ipa->iface_context[i];
ipa->notify = hdd_ipa_i2w_cb;
@@ -944,17 +957,7 @@ static int hdd_ipa_setup_sys_pipe(struct hdd_ipa_priv *hdd_ipa)
ipa->client = hdd_ipa->prod_client;
- /* The maximum number of descriptors that can be provided to a BAM at
- * once is one less than the total number of descriptors that the buffer
- * can contain.
- * If max_num_of_descriptors = (BAM_PIPE_DESCRIPTOR_FIFO_SIZE / sizeof
- * (SPS_DESCRIPTOR)), then (max_num_of_descriptors - 1) descriptors can
- * be provided at once.
- * Because of above requirement, one extra descriptor will be added to
- * make sure hardware always has one descriptor.
- */
- ipa->desc_fifo_sz = hdd_ipa->hdd_ctx->cfg_ini->IpaDescSize
- + sizeof(struct sps_iovec);
+ ipa->desc_fifo_sz = desc_fifo_sz;
ipa->priv = hdd_ipa;
ipa->notify = hdd_ipa_w2i_cb;