summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbings <bings@codeaurora.org>2017-02-21 10:10:36 +0800
committerqcabuildsw <qcabuildsw@localhost>2017-03-04 09:45:44 -0800
commit99acdd8bb381370ead548a5fec89755b5b9b1f99 (patch)
tree9cdc27599825bf4868d5d940f6d45fe34fcf96a6
parentba69fd20745209da8fdf92e2cc0b6c43f80a5c40 (diff)
qcacld-3.0: Fix FW crash caused by lack of rx reorder buffer
qcacld-2.0 to qcacld-3.0 propagation In high latency, Firmware will trigger crash when no more reorder buffer left. The number of prealloc reorder buffers depend on tid number, which equals 4 * clients number, so reassign num_tids in wmi_resource_config to 4 * no_of_peers_supported as Firmware suggested. Change-Id: If715cf201a283fa956b53dcdaccd534e57986fcb CRs-fixed: 2003903
-rw-r--r--core/wma/src/wma_main.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c
index 8bb49698d078..1f6ef2ba08b3 100644
--- a/core/wma/src/wma_main.c
+++ b/core/wma/src/wma_main.c
@@ -182,6 +182,24 @@ static uint8_t wma_get_number_of_peers_supported(tp_wma_handle wma)
}
/**
+ * wma_get_number_of_tids_supported - API to query for number of tids supported
+ * @no_of_peers_supported: Number of peer supported
+ *
+ * Return: Max number of tids supported
+ */
+#if defined(CONFIG_HL_SUPPORT)
+static uint32_t wma_get_number_of_tids_supported(uint8_t no_of_peers_supported)
+{
+ return 4 * no_of_peers_supported;
+}
+#else
+static uint32_t wma_get_number_of_tids_supported(uint8_t no_of_peers_supported)
+{
+ return 2 * (no_of_peers_supported + CFG_TGT_NUM_VDEV + 2);
+}
+#endif
+
+/**
* wma_set_default_tgt_config() - set default tgt config
* @wma_handle: wma handle
*
@@ -237,7 +255,8 @@ static void wma_set_default_tgt_config(tp_wma_handle wma_handle)
no_of_peers_supported = wma_get_number_of_peers_supported(wma_handle);
tgt_cfg.num_peers = no_of_peers_supported + CFG_TGT_NUM_VDEV + 2;
- tgt_cfg.num_tids = (2 * (no_of_peers_supported + CFG_TGT_NUM_VDEV + 2));
+ tgt_cfg.num_tids = wma_get_number_of_tids_supported(
+ no_of_peers_supported);
tgt_cfg.scan_max_pending_req = wma_handle->max_scan;
WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(tgt_cfg.flag1, 1);