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
此提交包含在:
bings
2018-05-30 11:05:27 +08:00
提交者 nshrivas
父節點 cf124491c7
當前提交 315d67f3f4

查看文件

@@ -618,8 +618,11 @@ static int __pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
__func__);
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 */
if (pktlog_enable_tgt(scn, log_state, ini_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__);
return -EINVAL;
}
pl_dev->is_pktlog_cb_subscribed = true;
if (is_iwpriv_command == 0)
pl_dev->vendor_cmd_send = true;