Bläddra i källkod

qcacmn: Handle vdev start stop delete event in mc thread

vdev start/stop/delete event need be handled in mc thread to
avoid race condition issue.

Change vdev start/stop/delete event handler as static

Change-Id: I360c3b34a18c41c506179225168d3bb490fc8823
CRs-Fixed: 2554731
Jianmin Zhu 5 år sedan
förälder
incheckning
367c36003b

+ 0 - 39
target_if/mlme/vdev_mgr/inc/target_if_vdev_mgr_rx_ops.h

@@ -79,45 +79,6 @@ void target_if_timer_flush_handler(struct wlan_objmgr_pdev *pdev,
  */
 void target_if_flush_vdev_timers(struct wlan_objmgr_pdev *pdev);
 
-/**
- * target_if_vdev_mgr_delete_response_handler() - API to handle vdev delete
- * response
- * @scn: pointer to scan object
- * @data: pointer to data
- * @datalen: length of data
- *
- * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
- */
-int target_if_vdev_mgr_delete_response_handler(ol_scn_t scn,
-					       uint8_t *data,
-					       uint32_t datalen);
-
-/**
- * target_if_vdev_mgr_stop_response_handler() - API to handle vdev stop
- * response
- * @scn: pointer to scan object
- * @data: pointer to data
- * @datalen: length of data
- *
- * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
- */
-int target_if_vdev_mgr_stop_response_handler(ol_scn_t scn,
-					     uint8_t *data,
-					     uint32_t datalen);
-
-/**
- * target_if_vdev_mgr_start_response_handler() - API to handle vdev stop
- * response
- * @scn: pointer to scan object
- * @data: pointer to data
- * @datalen: length of data
- *
- * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
- */
-int target_if_vdev_mgr_start_response_handler(ol_scn_t scn,
-					      uint8_t *data,
-					      uint32_t datalen);
-
 /**
  * target_if_vdev_mgr_offload_bcn_tx_status_handler() - API to handle beacon
  * tx status event

+ 17 - 13
target_if/mlme/vdev_mgr/src/target_if_vdev_mgr_rx_ops.c

@@ -183,7 +183,7 @@ void target_if_flush_vdev_timers(struct wlan_objmgr_pdev *pdev)
 					  NULL, true, WLAN_VDEV_TARGET_IF_ID);
 }
 
-#ifdef SERIALIZE_VDEV_RESP_TIMER
+#ifdef SERIALIZE_VDEV_RESP
 static QDF_STATUS target_if_vdev_mgr_rsp_flush_cb(struct scheduler_msg *msg)
 {
 	struct wlan_objmgr_vdev *vdev = msg->bodyptr;
@@ -222,16 +222,20 @@ void target_if_vdev_mgr_rsp_timer_mgmt_cb(void *arg)
 {
 	target_if_vdev_mgr_rsp_cb_mc_ctx(arg);
 }
+
+#define VDEV_RSP_RX_CTX WMI_RX_SERIALIZER_CTX
 #else
 void target_if_vdev_mgr_rsp_timer_mgmt_cb(void *arg)
 {
 	target_if_vdev_mgr_rsp_timer_cb(arg);
 }
+
+#define VDEV_RSP_RX_CTX WMI_RX_UMAC_CTX
 #endif
 
-int target_if_vdev_mgr_start_response_handler(ol_scn_t scn,
-					      uint8_t *data,
-					      uint32_t datalen)
+static int target_if_vdev_mgr_start_response_handler(ol_scn_t scn,
+						     uint8_t *data,
+						     uint32_t datalen)
 {
 	QDF_STATUS status = QDF_STATUS_E_INVAL;
 	struct wlan_objmgr_psoc *psoc;
@@ -318,9 +322,9 @@ release_vdev_target_if_ref:
 	return qdf_status_to_os_return(status);
 }
 
-int target_if_vdev_mgr_stop_response_handler(ol_scn_t scn,
-					     uint8_t *data,
-					     uint32_t datalen)
+static int target_if_vdev_mgr_stop_response_handler(ol_scn_t scn,
+						    uint8_t *data,
+						    uint32_t datalen)
 {
 	QDF_STATUS status = QDF_STATUS_E_INVAL;
 	struct wlan_objmgr_psoc *psoc;
@@ -393,9 +397,9 @@ release_vdev_target_if_ref:
 	return qdf_status_to_os_return(status);
 }
 
-int target_if_vdev_mgr_delete_response_handler(ol_scn_t scn,
-					       uint8_t *data,
-					       uint32_t datalen)
+static int target_if_vdev_mgr_delete_response_handler(ol_scn_t scn,
+						      uint8_t *data,
+						      uint32_t datalen)
 {
 	QDF_STATUS status = QDF_STATUS_E_INVAL;
 	struct wlan_objmgr_psoc *psoc;
@@ -707,7 +711,7 @@ QDF_STATUS target_if_vdev_mgr_wmi_event_register(
 				wmi_handle,
 				wmi_vdev_stopped_event_id,
 				target_if_vdev_mgr_stop_response_handler,
-				WMI_RX_UMAC_CTX);
+				VDEV_RSP_RX_CTX);
 	if (retval)
 		mlme_err("failed to register for stop response");
 
@@ -715,7 +719,7 @@ QDF_STATUS target_if_vdev_mgr_wmi_event_register(
 				wmi_handle,
 				wmi_vdev_delete_resp_event_id,
 				target_if_vdev_mgr_delete_response_handler,
-				WMI_RX_UMAC_CTX);
+				VDEV_RSP_RX_CTX);
 	if (retval)
 		mlme_err("failed to register for delete response");
 
@@ -723,7 +727,7 @@ QDF_STATUS target_if_vdev_mgr_wmi_event_register(
 				wmi_handle,
 				wmi_vdev_start_resp_event_id,
 				target_if_vdev_mgr_start_response_handler,
-				WMI_RX_UMAC_CTX);
+				VDEV_RSP_RX_CTX);
 	if (retval)
 		mlme_err("failed to register for start response");