qcacmn: 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: 2250715
This commit is contained in:
bings
2018-05-30 11:05:27 +08:00
committed by nshrivas
parent cf124491c7
commit 315d67f3f4

View File

@@ -618,8 +618,11 @@ static int __pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
__func__); __func__);
return -EINVAL; return -EINVAL;
} }
} else {
qdf_print("Unable to subscribe %d to the WDI %s\n",
log_state, __func__);
return -EINVAL;
} }
pl_dev->is_pktlog_cb_subscribed = true;
/* WMI command to enable pktlog on the firmware */ /* WMI command to enable pktlog on the firmware */
if (pktlog_enable_tgt(scn, log_state, ini_triggered, if (pktlog_enable_tgt(scn, log_state, ini_triggered,
user_triggered)) { user_triggered)) {
@@ -627,6 +630,7 @@ static int __pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
qdf_print("Device cannot be enabled, %s\n", __func__); qdf_print("Device cannot be enabled, %s\n", __func__);
return -EINVAL; return -EINVAL;
} }
pl_dev->is_pktlog_cb_subscribed = true;
if (is_iwpriv_command == 0) if (is_iwpriv_command == 0)
pl_dev->vendor_cmd_send = true; pl_dev->vendor_cmd_send = true;