Forráskód Böngészése

qcacmn: VDEV MLME component changes

1) replace legacy string with ext
2) Added new compile CMN_VDEV_MLME_CMPT_ENABLE macro for
   VDEV MLME component

Change-Id: I75fc7cbae9c437d60e666f0c188fb63e98fdac3b
CRs-Fixed: 2307722
Srinivas Pitla 6 éve
szülő
commit
d3a3c544bf

+ 20 - 20
umac/mlme/include/wlan_vdev_mlme.h

@@ -85,11 +85,11 @@ enum vdev_cmd_type {
  *                                      peer delete completion
  * @mlme_vdev_down_send:                callback to initiate actions of VDEV
  *                                      MLME down operation
- * @mlme_vdev_legacy_hdl_create:        callback to invoke creation of legacy
+ * @mlme_vdev_ext_hdl_create:           callback to invoke creation of legacy
  *                                      vdev object
- * @mlme_vdev_legacy_hdl_post_create:   callback to invoke post creation actions
+ * @mlme_vdev_ext_hdl_post_create:      callback to invoke post creation actions
  *                                      of legacy vdev object
- * @mlme_vdev_legacy_hdl_destroy:       callback to invoke destroy of legacy
+ * @mlme_vdev_ext_hdl_destroy:          callback to invoke destroy of legacy
  *                                      vdev object
  */
 struct vdev_mlme_ops {
@@ -149,11 +149,11 @@ struct vdev_mlme_ops {
 	QDF_STATUS (*mlme_vdev_notify_down_complete)(
 				struct vdev_mlme_obj *vdev_mlme,
 				uint16_t event_data_len, void *event_data);
-	QDF_STATUS (*mlme_vdev_legacy_hdl_create)(
+	QDF_STATUS (*mlme_vdev_ext_hdl_create)(
 				struct vdev_mlme_obj *vdev_mlme);
-	QDF_STATUS (*mlme_vdev_legacy_hdl_post_create)(
+	QDF_STATUS (*mlme_vdev_ext_hdl_post_create)(
 				struct vdev_mlme_obj *vdev_mlme);
-	QDF_STATUS (*mlme_vdev_legacy_hdl_destroy)(
+	QDF_STATUS (*mlme_vdev_ext_hdl_destroy)(
 				struct vdev_mlme_obj *vdev_mlme);
 
 };
@@ -164,7 +164,7 @@ struct vdev_mlme_ops {
  * @sm_lock:              VDEV SM lock
  * @sm_hdl:               VDEV SM handle
  * @ops:                  VDEV MLME callback table
- * @legacy_vdev_ptr:      VDEV MLME legacy pointer
+ * @ext_vdev_ptr:         VDEV MLME legacy pointer
  */
 struct vdev_mlme_obj {
 	struct vdev_mlme_proto vdev_proto;
@@ -174,7 +174,7 @@ struct vdev_mlme_obj {
 	struct wlan_sm *sm_hdl;
 	struct wlan_objmgr_vdev *vdev;
 	struct vdev_mlme_ops *ops;
-	void *legacy_vdev_ptr;
+	void *ext_vdev_ptr;
 };
 
 /**
@@ -616,7 +616,7 @@ static inline QDF_STATUS mlme_vdev_notify_down_complete(
 }
 
 /**
- * mlme_vdev_legacy_hdl_create - VDEV legacy pointer allocation
+ * mlme_vdev_ext_hdl_create - VDEV legacy pointer allocation
  * @vdev_mlme_obj:  VDEV MLME comp object
  *
  * API invokes legacy pointer allocation and initialization
@@ -624,19 +624,19 @@ static inline QDF_STATUS mlme_vdev_notify_down_complete(
  * Return: SUCCESS on successful creation of legacy handle
  *         FAILURE, if it fails due to any
  */
-static inline QDF_STATUS mlme_vdev_legacy_hdl_create(
+static inline QDF_STATUS mlme_vdev_ext_hdl_create(
 			      struct vdev_mlme_obj *vdev_mlme)
 {
 	QDF_STATUS ret = QDF_STATUS_SUCCESS;
 
-	if ((vdev_mlme->ops) && vdev_mlme->ops->mlme_vdev_legacy_hdl_create)
-		ret = vdev_mlme->ops->mlme_vdev_legacy_hdl_create(vdev_mlme);
+	if ((vdev_mlme->ops) && vdev_mlme->ops->mlme_vdev_ext_hdl_create)
+		ret = vdev_mlme->ops->mlme_vdev_ext_hdl_create(vdev_mlme);
 
 	return ret;
 }
 
 /**
- * mlme_vdev_legacy_hdl_post_create - VDEV post legacy pointer allocation
+ * mlme_vdev_ext_hdl_post_create - VDEV post legacy pointer allocation
  * @vdev_mlme_obj:  VDEV MLME comp object
  *
  * API invokes post legacy pointer allocation operation
@@ -644,21 +644,21 @@ static inline QDF_STATUS mlme_vdev_legacy_hdl_create(
  * Return: SUCCESS on successful creation of legacy handle
  *         FAILURE, if it fails due to any
  */
-static inline QDF_STATUS mlme_vdev_legacy_hdl_post_create(
+static inline QDF_STATUS mlme_vdev_ext_hdl_post_create(
 				struct vdev_mlme_obj *vdev_mlme)
 {
 	QDF_STATUS ret = QDF_STATUS_SUCCESS;
 
 	if ((vdev_mlme->ops) &&
-	    vdev_mlme->ops->mlme_vdev_legacy_hdl_post_create)
-		ret = vdev_mlme->ops->mlme_vdev_legacy_hdl_post_create(
+	    vdev_mlme->ops->mlme_vdev_ext_hdl_post_create)
+		ret = vdev_mlme->ops->mlme_vdev_ext_hdl_post_create(
 								vdev_mlme);
 
 	return ret;
 }
 
 /**
- * mlme_vdev_legacy_hdl_destroy - VDEV legacy pointer free
+ * mlme_vdev_ext_hdl_destroy - VDEV legacy pointer free
  * @vdev_mlme_obj:  VDEV MLME comp object
  *
  * API invokes legacy pointer free
@@ -666,13 +666,13 @@ static inline QDF_STATUS mlme_vdev_legacy_hdl_post_create(
  * Return: SUCCESS on successful free of legacy handle
  *         FAILURE, if it fails due to any
  */
-static inline QDF_STATUS mlme_vdev_legacy_hdl_destroy(
+static inline QDF_STATUS mlme_vdev_ext_hdl_destroy(
 			      struct vdev_mlme_obj *vdev_mlme)
 {
 	QDF_STATUS ret = QDF_STATUS_SUCCESS;
 
-	if ((vdev_mlme->ops) && vdev_mlme->ops->mlme_vdev_legacy_hdl_destroy)
-		ret = vdev_mlme->ops->mlme_vdev_legacy_hdl_destroy(vdev_mlme);
+	if ((vdev_mlme->ops) && vdev_mlme->ops->mlme_vdev_ext_hdl_destroy)
+		ret = vdev_mlme->ops->mlme_vdev_ext_hdl_destroy(vdev_mlme);
 
 	return ret;
 }

+ 25 - 20
umac/mlme/mlme_objmgr/dispatcher/inc/wlan_vdev_mlme_main.h

@@ -136,26 +136,6 @@ enum wlan_vdev_sm_evt {
 	WLAN_VDEV_SM_EV_ROAM = 28,
 };
 
-/**
- * wlan_vdev_mlme_init - Initializes MLME component
- *
- * Registers callbacks with object manager for create/destroy
- *
- * Return: SUCCESS on successful registration
- *         FAILURE, if registration fails
- */
-QDF_STATUS wlan_vdev_mlme_init(void);
-
-/**
- * wlan_vdev_mlme_deinit - Uninitializes MLME component
- *
- * Unregisters callbacks with object manager for create/destroy
- *
- * Return: SUCCESS on successful registration
- *         FAILURE, if registration fails
- */
-QDF_STATUS wlan_vdev_mlme_deinit(void);
-
 #else
 
 /**
@@ -179,6 +159,31 @@ enum wlan_vdev_state {
 	WLAN_VDEV_S_RESET    = 6,
 	WLAN_VDEV_S_MAX,
 };
+#endif
+
+#ifdef CMN_VDEV_MLME_CMPT_ENABLE
+
+/**
+ * wlan_vdev_mlme_init - Initializes MLME component
+ *
+ * Registers callbacks with object manager for create/destroy
+ *
+ * Return: SUCCESS on successful registration
+ *         FAILURE, if registration fails
+ */
+QDF_STATUS wlan_vdev_mlme_init(void);
+
+/**
+ * wlan_vdev_mlme_deinit - Uninitializes MLME component
+ *
+ * Unregisters callbacks with object manager for create/destroy
+ *
+ * Return: SUCCESS on successful registration
+ *         FAILURE, if registration fails
+ */
+QDF_STATUS wlan_vdev_mlme_deinit(void);
+
+#else
 
 /**
  * wlan_vdev_mlme_init - Initializes MLME component

+ 8 - 8
umac/mlme/mlme_objmgr/dispatcher/src/wlan_vdev_mlme_main.c

@@ -63,9 +63,9 @@ static QDF_STATUS mlme_vdev_obj_create_handler(struct wlan_objmgr_vdev *vdev,
 		goto init_failed;
 	}
 
-	if (mlme_vdev_legacy_hdl_create(vdev_mlme) != QDF_STATUS_SUCCESS) {
+	if (mlme_vdev_ext_hdl_create(vdev_mlme) != QDF_STATUS_SUCCESS) {
 		mlme_err("Legacy vdev object creation failed");
-		goto legacy_hdl_create_failed;
+		goto ext_hdl_create_failed;
 	}
 
 	wlan_objmgr_vdev_component_obj_attach((struct wlan_objmgr_vdev *)vdev,
@@ -73,18 +73,18 @@ static QDF_STATUS mlme_vdev_obj_create_handler(struct wlan_objmgr_vdev *vdev,
 					      (void *)vdev_mlme,
 					      QDF_STATUS_SUCCESS);
 
-	if (mlme_vdev_legacy_hdl_post_create(vdev_mlme) != QDF_STATUS_SUCCESS) {
+	if (mlme_vdev_ext_hdl_post_create(vdev_mlme) != QDF_STATUS_SUCCESS) {
 		mlme_err("Legacy vdev object post creation failed");
-		goto legacy_hdl_post_create_failed;
+		goto ext_hdl_post_create_failed;
 	}
 
 	return QDF_STATUS_SUCCESS;
 
-legacy_hdl_post_create_failed:
-	mlme_vdev_legacy_hdl_destroy(vdev_mlme);
+ext_hdl_post_create_failed:
+	mlme_vdev_ext_hdl_destroy(vdev_mlme);
 	wlan_objmgr_vdev_component_obj_detach(vdev, WLAN_UMAC_COMP_MLME,
 					      vdev_mlme);
-legacy_hdl_create_failed:
+ext_hdl_create_failed:
 	mlme_vdev_sm_destroy(vdev_mlme);
 init_failed:
 	qdf_mem_free(vdev_mlme);
@@ -111,7 +111,7 @@ static QDF_STATUS mlme_vdev_obj_destroy_handler(struct wlan_objmgr_vdev *vdev,
 
 	mlme_vdev_sm_destroy(vdev_mlme);
 
-	mlme_vdev_legacy_hdl_destroy(vdev_mlme);
+	mlme_vdev_ext_hdl_destroy(vdev_mlme);
 
 	wlan_objmgr_vdev_component_obj_detach(vdev, WLAN_UMAC_COMP_MLME,
 					      vdev_mlme);

+ 2 - 2
umac/mlme/vdev_mgr/dispatcher/inc/wlan_vdev_mlme_api.h

@@ -34,14 +34,14 @@
 struct vdev_mlme_obj *wlan_vdev_mlme_get_cmpt_obj(
 						struct wlan_objmgr_vdev *vdev);
 /**
- * wlan_vdev_mlme_get_legacy_hdl - Returns legacy handle
+ * wlan_vdev_mlme_get_ext_hdl - Returns legacy handle
  *
  * Retrieves legacy handle from vdev mlme component object
  *
  * Return: legacy handle on SUCCESS
  *         NULL, if it fails to retrieve
  */
-void *wlan_vdev_mlme_get_legacy_hdl(struct wlan_objmgr_vdev *vdev);
+void *wlan_vdev_mlme_get_ext_hdl(struct wlan_objmgr_vdev *vdev);
 
 #ifdef CMN_VDEV_MLME_SM_ENABLE
 /**

+ 3 - 3
umac/mlme/vdev_mgr/dispatcher/src/wlan_vdev_mlme_api.c

@@ -46,18 +46,18 @@ struct vdev_mlme_obj *wlan_vdev_mlme_get_cmpt_obj(struct wlan_objmgr_vdev *vdev)
 	return vdev_mlme;
 }
 
-void *wlan_vdev_mlme_get_legacy_hdl(struct wlan_objmgr_vdev *vdev)
+void *wlan_vdev_mlme_get_ext_hdl(struct wlan_objmgr_vdev *vdev)
 {
 	struct vdev_mlme_obj *vdev_mlme;
 
 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
 	if (vdev_mlme)
-		return vdev_mlme->legacy_vdev_ptr;
+		return vdev_mlme->ext_vdev_ptr;
 
 	return NULL;
 }
 
-qdf_export_symbol(wlan_vdev_mlme_get_legacy_hdl);
+qdf_export_symbol(wlan_vdev_mlme_get_ext_hdl);
 
 #ifdef CMN_VDEV_MLME_SM_ENABLE
 QDF_STATUS wlan_vdev_mlme_sm_deliver_evt(struct wlan_objmgr_vdev *vdev,