Browse Source

cmndev: Initialize the WMI pending command after target recovery

In the case of SSR, the WMI layer callbacks will not be called as part of
tx completion. Hence, the nbuf and HTC packets are freed in
send_packet_completion(). In this case, the WMI pending command count is
not decremented. During target recovery, this wmi pending command will be
increasing eventually, and assert will be seen when pending commands reach
MAX defined value.

To fix this, initialize the WMI pending commands to zero after the target
recovery.

Change-Id: I56d38d7064bc089725d5453883c22f572e51e078
CRs-Fixed: 3513491
Shashikala Prabhu 2 years ago
parent
commit
6bb6eb3b88
1 changed files with 1 additions and 1 deletions
  1. 1 1
      wmi/src/wmi_unified.c

+ 1 - 1
wmi/src/wmi_unified.c

@@ -3217,7 +3217,6 @@ void *wmi_unified_get_pdev_handle(struct wmi_soc *soc, uint32_t pdev_idx)
 		wmi_handle->cmd_phy_id_map = soc->cmd_phy_id_map;
 		wmi_handle->cmd_phy_id_map = soc->cmd_phy_id_map;
 		wmi_handle->evt_phy_id_map = soc->evt_phy_id_map;
 		wmi_handle->evt_phy_id_map = soc->evt_phy_id_map;
 		wmi_interface_logging_init(wmi_handle, pdev_idx);
 		wmi_interface_logging_init(wmi_handle, pdev_idx);
-		qdf_atomic_init(&wmi_handle->pending_cmds);
 		qdf_atomic_init(&wmi_handle->is_target_suspended);
 		qdf_atomic_init(&wmi_handle->is_target_suspended);
 		qdf_atomic_init(&wmi_handle->is_wow_enable_ack_failed);
 		qdf_atomic_init(&wmi_handle->is_wow_enable_ack_failed);
 		wmi_handle->target_type = soc->target_type;
 		wmi_handle->target_type = soc->target_type;
@@ -3232,6 +3231,7 @@ void *wmi_unified_get_pdev_handle(struct wmi_soc *soc, uint32_t pdev_idx)
 	} else
 	} else
 		wmi_handle = soc->wmi_pdev[pdev_idx];
 		wmi_handle = soc->wmi_pdev[pdev_idx];
 
 
+	qdf_atomic_init(&wmi_handle->pending_cmds);
 	wmi_handle->wmi_stopinprogress = 0;
 	wmi_handle->wmi_stopinprogress = 0;
 	wmi_handle->wmi_endpoint_id = soc->wmi_endpoint_id[pdev_idx];
 	wmi_handle->wmi_endpoint_id = soc->wmi_endpoint_id[pdev_idx];
 	wmi_handle->htc_handle = soc->htc_handle;
 	wmi_handle->htc_handle = soc->htc_handle;