Эх сурвалжийг харах

qca-wifi: Correct the condition for dump_lut in CFR

Earlier, CFR's LUT was dumped when difference between dbr count
and release count is greater than 1. This might be agrressive.
Modified the condition to reflect the worst case where LUT has
no empty entry.

Change-Id: I010431b446ddb66364505f0c8d9a70dd181eb8b1
Abhiram Jogadenu 5 жил өмнө
parent
commit
fe2c3b839b

+ 4 - 3
target_if/cfr/src/target_if_cfr_8074v2.c

@@ -177,20 +177,21 @@ int correlate_and_relay(struct wlan_objmgr_pdev *pdev, uint32_t cookie,
 
 			/*
 			 * This is condition can occur if DBR buffer did not get
-			 * released or leaked either by Host / Target
+			 * released, or leaked either by Host/Target.
 			 * we may need to add recovery here.
 			 *
 			 * 1. Stop all captures
 			 * 2. Flush/release DBR buffer and LUT
 			 * 3. Start capture again
 			 */
-			if (pdev_cfrobj->dbr_evt_cnt - pdev_cfrobj->release_cnt > 1) {
+			if ((pdev_cfrobj->dbr_evt_cnt -
+				pdev_cfrobj->release_cnt) >= MAX_LUT_ENTRIES) {
 				cfr_err("cookie = %u dbr_cnt = %d, release_cnt = %d",
 					cookie, pdev_cfrobj->dbr_evt_cnt,
 					pdev_cfrobj->release_cnt);
 				dump_lut(pdev);
 				dump_dma_hdr(&lut->dma_hdr, 1);
-				cfr_debug("correlation_info1: 0x%08x correlation_info2 0x%08x",
+				cfr_err("correlation_info1: 0x%08x correlation_info2 0x%08x",
 					  lut->tx_address1, lut->tx_address2);
 			}