From dd4fe53156eb933fdacddd27dc519d161b2aeba2 Mon Sep 17 00:00:00 2001 From: bings Date: Fri, 11 May 2018 15:01:49 +0800 Subject: 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 --- CORE/UTILS/PKTLOG/pktlog_ac.c | 5 +++-- 1 file 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; } -- cgit v1.2.3