فهرست منبع

qcacmn: add synchronous timer stop to avoid race condition

Change the qdf_timer_stop to qdf_timer_sync_cancel (synchronized
timer stop), so it can wait till previous handler is completed
and then stop/delete the timer, to avoid race condition.
Also, call this qdf_timer_sync_cancel in dp_vdev_detach_wifi3,
to be symmetry with timer start in dp_vdev_attach_wifi3.

Change-Id: I3e975554b5492ccfc684ffe8b021c62ef39bf4d7
CRs-Fixed: 2644432
Vevek Venkatesan 5 سال پیش
والد
کامیت
a62641c747
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      dp/wifi3.0/dp_main.c

+ 4 - 2
dp/wifi3.0/dp_main.c

@@ -2069,7 +2069,6 @@ static void dp_soc_interrupt_detach(struct cdp_soc_t *txrx_soc)
 	int i;
 
 	if (soc->intr_mode == DP_INTR_POLL) {
-		qdf_timer_stop(&soc->int_timer);
 		qdf_timer_free(&soc->int_timer);
 	} else {
 		hif_deregister_exec_group(soc->hif_handle, "dp_intr");
@@ -5501,8 +5500,11 @@ static QDF_STATUS dp_vdev_detach_wifi3(struct cdp_soc_t *cdp_soc,
 	dp_rx_vdev_detach(vdev);
 
 free_vdev:
-	if (wlan_op_mode_monitor == vdev->opmode)
+	if (wlan_op_mode_monitor == vdev->opmode) {
+		if (soc->intr_mode == DP_INTR_POLL)
+			qdf_timer_sync_cancel(&soc->int_timer);
 		pdev->monitor_vdev = NULL;
+	}
 
 	if (vdev->vdev_dp_ext_handle) {
 		qdf_mem_free(vdev->vdev_dp_ext_handle);