Sfoglia il codice sorgente

qcacmn: Add change to send target if response to HOST

Add code to enable sending target_if vdev response to host,
if FW fails to send response within expiry time.
Move timer free functionality to vdev destroy path so as
to make the system not to go into deadlock

Change-Id: I72bdecf2502a755ffc09414f8b72d230bf9c559f
Crs-Fixed: 2449238
Akshay Kosigi 5 anni fa
parent
commit
4a994eff88

+ 1 - 17
target_if/mlme/vdev_mgr/src/target_if_vdev_mgr_tx_ops.c

@@ -74,6 +74,7 @@ static QDF_STATUS target_if_vdev_mgr_rsp_timer_stop(
 		if (vdev_rsp->timer_status != QDF_STATUS_E_TIMEOUT)
 			qdf_timer_stop(&vdev_rsp->rsp_timer);
 
+		vdev_rsp->timer_status = QDF_STATUS_SUCCESS;
 		/*
 		 * Releasing reference taken at the time of
 		 * starting response timer
@@ -147,21 +148,6 @@ static QDF_STATUS target_if_vdev_mgr_rsp_timer_init(
 	return QDF_STATUS_SUCCESS;
 }
 
-static QDF_STATUS target_if_vdev_mgr_rsp_timer_deinit(
-					struct wlan_objmgr_vdev *vdev,
-					qdf_timer_t *rsp_timer)
-{
-	if (!vdev || !rsp_timer) {
-		mlme_err("Invalid input");
-		return QDF_STATUS_E_INVAL;
-	}
-
-	qdf_timer_free(rsp_timer);
-	mlme_debug("VDEV_%d: Response timer free", wlan_vdev_get_id(vdev));
-
-	return QDF_STATUS_SUCCESS;
-}
-
 struct wmi_unified
 *target_if_vdev_mgr_wmi_handle_get(struct wlan_objmgr_vdev *vdev)
 {
@@ -951,8 +937,6 @@ target_if_vdev_mgr_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
 			target_if_vdev_mgr_sta_ps_param_send;
 	mlme_tx_ops->vdev_mgr_rsp_timer_init =
 			target_if_vdev_mgr_rsp_timer_init;
-	mlme_tx_ops->vdev_mgr_rsp_timer_deinit =
-			target_if_vdev_mgr_rsp_timer_deinit;
 	mlme_tx_ops->vdev_mgr_rsp_timer_mod =
 			target_if_vdev_mgr_rsp_timer_mod;
 	mlme_tx_ops->vdev_mgr_rsp_timer_stop =

+ 0 - 4
umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h

@@ -192,7 +192,6 @@ struct wlan_lmac_if_ftm_tx_ops {
  * @vdev_mlme_attach: function to register events
  * @vdev_mlme_detach: function to unregister events
  * @vdev_mgr_rsp_timer_init: function to initialize vdev response timer
- * @vdev_mgr_rsp_timer_deinit: function to free vdev response timer
  * @vdev_mgr_rsp_timer_mod: function to timer_mod vdev response timer
  * @vdev_mgr_rsp_timer_stop: function to stop vdev response timer
  * @vdev_create_send: function to send vdev create
@@ -227,9 +226,6 @@ struct wlan_lmac_if_mlme_tx_ops {
 	QDF_STATUS (*vdev_mgr_rsp_timer_init)(
 					struct wlan_objmgr_vdev *vdev,
 					qdf_timer_t *rsp_timer);
-	QDF_STATUS (*vdev_mgr_rsp_timer_deinit)(
-					struct wlan_objmgr_vdev *vdev,
-					qdf_timer_t *rsp_timer);
 	QDF_STATUS (*vdev_mgr_rsp_timer_mod)(
 					struct wlan_objmgr_vdev *vdev,
 					struct vdev_response_timer *vdev_rsp,

+ 3 - 0
umac/mlme/mlme_objmgr/dispatcher/src/wlan_vdev_mlme_main.c

@@ -110,6 +110,7 @@ static QDF_STATUS mlme_vdev_obj_destroy_handler(struct wlan_objmgr_vdev *vdev,
 	struct wlan_objmgr_psoc *psoc;
 	struct cdp_soc_t *soc_txrx_handle;
 	struct cdp_vdev *vdev_txrx_handle;
+	struct vdev_response_timer *vdev_rsp;
 
 	if (!vdev) {
 		mlme_err(" VDEV is NULL");
@@ -131,6 +132,8 @@ static QDF_STATUS mlme_vdev_obj_destroy_handler(struct wlan_objmgr_vdev *vdev,
 				NULL, NULL);
 	}
 
+	vdev_rsp = &vdev_mlme->vdev_rt;
+	qdf_timer_free(&vdev_rsp->rsp_timer);
 	mlme_vdev_sm_destroy(vdev_mlme);
 
 	mlme_vdev_ops_ext_hdl_destroy(vdev_mlme);

+ 1 - 3
umac/mlme/vdev_mgr/dispatcher/src/wlan_vdev_mgr_tgt_if_rx_api.c

@@ -187,9 +187,7 @@ QDF_STATUS tgt_vdev_mgr_delete_response_handler(
 	tx_ops = target_if_vdev_mgr_get_tx_ops(psoc);
 	status = tx_ops->vdev_mgr_rsp_timer_stop(vdev, vdev_rsp,
 						 DELETE_RESPONSE_BIT);
-	if (QDF_IS_STATUS_SUCCESS(status)) {
-		tx_ops->vdev_mgr_rsp_timer_deinit(vdev, &vdev_rsp->rsp_timer);
-	} else {
+	if (QDF_IS_STATUS_ERROR(status)) {
 		mlme_err("VDEV_%d: Unexpected response", rsp->vdev_id);
 		goto tgt_vdev_mgr_delete_response_handler_end;
 	}