summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbings <bings@codeaurora.org>2018-05-11 15:01:49 +0800
committerbings <bings@codeaurora.org>2018-05-15 09:41:56 +0800
commitdd4fe53156eb933fdacddd27dc519d161b2aeba2 (patch)
tree8ed4cb9ac14982f82928425ebe3d75d3bcdcf3c2
parentf0adf1187e7e0d6e54f53c32b72663a16654b56a (diff)
qcacld-2.0: Fix pl_info->log_stat update
If log state 1, 2, 0, 1 are set serially, log state 2 can't be set successfully, while log state 1 is set to wdi twice, which results in two same pointers in doubly linked list txrx_pdev->wdi_event_list and causes dead loop. Update pl_info->log_stat only when it is subscribed to wdi and sent to firmware successfully. Change-Id: I8d67b9f02a2fb2c958d2553a743cbabcedfb2f42 CRs-Fixed: 2220883
-rw-r--r--CORE/UTILS/PKTLOG/pktlog_ac.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/CORE/UTILS/PKTLOG/pktlog_ac.c b/CORE/UTILS/PKTLOG/pktlog_ac.c
index 679a78ccfab0..9141a2ba85ae 100644
--- a/CORE/UTILS/PKTLOG/pktlog_ac.c
+++ b/CORE/UTILS/PKTLOG/pktlog_ac.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -379,6 +379,7 @@ __pktlog_enable(struct ol_softc *scn, int32_t log_state)
} else {
pl_dev->tgt_pktlog_enabled = true;
}
+ pl_info->log_state = log_state;
} else if (!log_state && pl_dev->tgt_pktlog_enabled) {
pl_dev->pl_funcs->pktlog_disable(scn);
pl_dev->tgt_pktlog_enabled = false;
@@ -387,9 +388,9 @@ __pktlog_enable(struct ol_softc *scn, int32_t log_state)
__func__);
return A_ERROR;
}
+ pl_info->log_state = log_state;
}
- pl_info->log_state = log_state;
return 0;
}