Browse Source

qcacld-3.0: Add legacy VDEV manager callbacks

Add legacy VDEV manager callbacks framework.

Change-Id: I8529a54382b3ffdecd25e54a97fc69d6a6a68177
CRs-Fixed: 2312724
Sandeep Puligilla 6 years ago
parent
commit
b7beb478db

+ 4 - 0
Kbuild

@@ -850,6 +850,10 @@ MLME_OBJS :=	$(MLME_DIR)/core/src/wlan_mlme_main.o \
 		$(MLME_DIR)/dispatcher/src/wlan_mlme_api.o \
 		$(MLME_DIR)/dispatcher/src/wlan_mlme_ucfg_api.o
 
+ifeq ($(CONFIG_VDEV_SM), y)
+MLME_OBJS += $(MLME_DIR)/core/src/wlan_mlme_vdev_mgr_interface.o
+endif
+
 ########## ACTION OUI ##########
 
 ACTION_OUI_DIR := components/action_oui

+ 47 - 0
components/mlme/core/inc/wlan_mlme_vdev_mgr_interface.h

@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2018 The Linux Foundation. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+/**
+ * DOC: declare VDEV Manager interface APIs exposed by the mlme component
+ */
+
+#ifndef _WLAN_MLME_VDEV_MGR_INT_API_H_
+#define _WLAN_MLME_VDEV_MGR_INT_API_H_
+
+#ifdef CONFIG_VDEV_SM
+#include "include/wlan_vdev_mlme.h"
+
+/**
+ * mlme_register_vdev_mgr_ops() - Register vdev mgr ops
+ * @vdev_mlme: vdev mlme object
+ *
+ * This function is called to register vdev manager operations
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS mlme_register_vdev_mgr_ops(void *mlme);
+/**
+ * mlme_unregister_vdev_mgr_ops() - Unregister vdev mgr ops
+ * @vdev_mlme: vdev mlme object
+ *
+ * This function is called to unregister vdev manager operations
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS mlme_unregister_vdev_mgr_ops(struct vdev_mlme_obj *vdev_mlme);
+#endif
+#endif

+ 621 - 0
components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c

@@ -0,0 +1,621 @@
+/*
+ * Copyright (c) 2018 The Linux Foundation. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+/**
+ * DOC: define internal APIs related to the mlme component
+ */
+#include <wlan_objmgr_vdev_obj.h>
+#include "wlan_mlme_main.h"
+#include "wlan_mlme_vdev_mgr_interface.h"
+
+static struct vdev_mlme_ops sta_mlme_ops;
+static struct vdev_mlme_ops ap_mlme_ops;
+
+/**
+ * mlme_is_vdev_in_beaconning_mode() - check if vdev is beaconing mode
+ * @vdev_opmode: vdev opmode
+ *
+ * This function is called to register vdev manager operations
+ *
+ * Return: QDF_STATUS
+ */
+static inline bool mlme_is_vdev_in_beaconning_mode(enum QDF_OPMODE vdev_opmode)
+{
+	switch (vdev_opmode) {
+	case QDF_SAP_MODE:
+	case QDF_P2P_GO_MODE:
+	case QDF_IBSS_MODE:
+	case QDF_NDI_MODE:
+		return true;
+	default:
+		return false;
+	}
+}
+
+/**
+ * mlme_register_vdev_mgr_ops() - Register vdev mgr ops
+ * @vdev_mlme: vdev mlme object
+ *
+ * This function is called to register vdev manager operations
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS mlme_register_vdev_mgr_ops(void *mlme)
+{
+	struct wlan_objmgr_vdev *vdev;
+	struct vdev_mlme_obj *vdev_mlme = (struct vdev_mlme_obj *)mlme;
+
+	vdev = vdev_mlme->vdev;
+
+	if (mlme_is_vdev_in_beaconning_mode(vdev->vdev_mlme.vdev_opmode))
+		vdev_mlme->ops = &ap_mlme_ops;
+	else
+		vdev_mlme->ops = &sta_mlme_ops;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * mlme_unregister_vdev_mgr_ops() - Unregister vdev mgr ops
+ * @vdev_mlme: vdev mlme object
+ *
+ * This function is called to unregister vdev manager operations
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS mlme_unregister_vdev_mgr_ops(struct vdev_mlme_obj *vdev_mlme)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * sta_mlme_vdev_start_send() - MLME vdev start callback
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to initiate actions of VDEV.start
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS sta_mlme_vdev_start_send(struct vdev_mlme_obj *vdev_mlme,
+					   uint16_t event_data_len,
+					   void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * sta_mlme_vdev_restart_send() - MLME vdev restart send
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to initiate actions of VDEV.start
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS sta_mlme_vdev_restart_send(struct vdev_mlme_obj *vdev_mlme,
+					     uint16_t event_data_len,
+					     void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * sta_mlme_vdev_start_continue() - MLME vdev restart send
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to initiate actions of VDEV.start
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS sta_mlme_vdev_start_continue(struct vdev_mlme_obj *vdev_mlme,
+					       uint16_t event_data_len,
+					       void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * sta_mlme_vdev_start_continue() - MLME vdev start callback
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to initiate actions of STA connection
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS sta_mlme_vdev_start_connection(struct vdev_mlme_obj *vdev_mlme,
+						 uint16_t event_data_len,
+						 void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * sta_mlme_vdev_up_send() - MLME vdev UP callback
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to send the vdev up command
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS sta_mlme_vdev_up_send(struct vdev_mlme_obj *vdev_mlme,
+					uint16_t event_data_len,
+					void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * sta_mlme_vdev_notify_up_complete() - MLME vdev UP complete callback
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to VDEV MLME on moving
+ *  to UP state
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS sta_mlme_vdev_notify_up_complete(struct vdev_mlme_obj *vdev_mlme,
+						   uint16_t event_data_len,
+						   void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * sta_mlme_vdev_disconnect_bss() - MLME vdev disconnect bss callback
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to disconnect BSS/send deauth to AP
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS sta_mlme_vdev_disconnect_bss(struct vdev_mlme_obj *vdev_mlme,
+					       uint16_t event_data_len,
+					       void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * sta_mlme_vdev_stop_send() - MLME vdev stop send callback
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to send the vdev stop to firmware
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS sta_mlme_vdev_stop_send(struct vdev_mlme_obj *vdev_mlme,
+					  uint16_t event_data_len,
+					  void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * sta_mlme_vdev_stop_continue() - MLME vdev stop send callback
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to initiate operations on
+ * LMAC/FW stop response such as remove peer.
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS sta_mlme_vdev_stop_continue(struct vdev_mlme_obj *vdev_mlme,
+					      uint16_t event_data_len,
+					      void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * sta_mlme_vdev_down_send() - MLME vdev down send callback
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is to send the vdev down to firmware
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS sta_mlme_vdev_down_send(struct vdev_mlme_obj *vdev_mlme,
+					  uint16_t event_data_len,
+					  void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * sta_vdev_notify_down_complete() - MLME vdev down complete callback
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called on moving vdev state to down.
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS sta_vdev_notify_down_complete(struct vdev_mlme_obj *vdev_mlme,
+						 uint16_t event_data_len,
+						 void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * ap_mlme_vdev_start_send () - send vdev start
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to initiate actions of VDEV start ie start bss
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS ap_mlme_vdev_start_send(struct vdev_mlme_obj *vdev_mlme,
+					  uint16_t event_data_len,
+					  void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * ap_mlme_vdev_start_continue () - vdev start rsp calback
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to handle the VDEV START/RESTART calback
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS ap_mlme_vdev_start_continue(struct vdev_mlme_obj *vdev_mlme,
+					      uint16_t event_data_len,
+					      void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * ap_mlme_vdev_start_req_failed () - vdev start req fail callback
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to handle vdev start req/rsp failure
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS ap_mlme_vdev_start_req_failed(struct vdev_mlme_obj *vdev_mlme,
+						uint16_t event_data_len,
+						void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * ap_mlme_vdev_update_beacon() - callback to initiate beacon update
+ * @vdev_mlme: vdev mlme object
+ * @op: beacon operation
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to update beacon
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS ap_mlme_vdev_update_beacon(struct vdev_mlme_obj *vdev_mlme,
+					     enum beacon_update_op op,
+					     uint16_t event_data_len,
+					     void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * ap_mlme_vdev_up_send() – callback to send vdev up
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to send vdev up req
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS ap_mlme_vdev_up_send(struct vdev_mlme_obj *vdev_mlme,
+				       uint16_t event_data_len,
+				       void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * ap_mlme_vdev_notify_up_complete() – callback to notify up completion
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to indicate up is completed
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS ap_mlme_vdev_notify_up_complete(struct vdev_mlme_obj *vdev_mlme,
+						  uint16_t event_data_len,
+						  void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * sap_mlme_vdev_restart_send() a callback to send vdev restart
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to initiate and send vdev restart req
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS ap_mlme_vdev_restart_send(struct vdev_mlme_obj *vdev_mlme,
+					    uint16_t event_data_len,
+					    void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+static QDF_STATUS ap_mlme_vdev_stop_start_send(struct vdev_mlme_obj *vdev_mlme,
+					       uint8_t restart,
+					       uint16_t event_data_len,
+					       void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * ap_mlme_vdev_disconnect_peers() – callback to disconnect all
+ *                                   connected peers
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to disconnect all connected peers
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS ap_mlme_vdev_disconnect_peers(struct vdev_mlme_obj *vdev_mlme,
+						uint16_t event_data_len,
+						void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * ap_mlme_vdev_stop_send() – callback to send stop vdev request
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to send stop vdev request
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS ap_mlme_vdev_stop_send(struct vdev_mlme_obj *vdev_mlme,
+					 uint16_t event_data_len,
+					 void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * ap_mlme_vdev_stop_continue() – callback to handle stop vdev resp
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to handle stop vdev resp
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS ap_mlme_vdev_stop_continue(struct vdev_mlme_obj *vdev_mlme,
+					     uint16_t event_data_len,
+					     void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * ap_mlme_vdev_down_send() – callback to send vdev down req
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to send vdev down req
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS ap_mlme_vdev_down_send(struct vdev_mlme_obj *vdev_mlme,
+					 uint16_t event_data_len,
+					 void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * ap_vdev_notify_down_complete() – callback to indicate vdev
+ *                                  down is completed
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to indicate vdev down is completed
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS ap_vdev_notify_down_complete(struct vdev_mlme_obj *vdev_mlme,
+					       uint16_t event_data_len,
+					       void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+static
+QDF_STATUS ap_mlme_vdev_legacy_hdl_create(struct vdev_mlme_obj *vdev_mlme)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+static
+QDF_STATUS ap_mlme_vdev_legacy_hdl_destroy(struct vdev_mlme_obj *vdev_mlme)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * ap_vdev_dfs_cac_timer_stop() – callback to stop cac timer
+ * @vdev_mlme: vdev mlme object
+ * @event_data_len: event data length
+ * @event_data: event data
+ *
+ * This function is called to stop cac timer
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS ap_vdev_dfs_cac_timer_stop(struct vdev_mlme_obj *vdev_mlme,
+					     uint16_t event_data_len,
+					     void *event_data)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * struct sta_mlme_ops - VDEV MLME operation callbacks strucutre for sta
+ * @mlme_vdev_validate_basic_params:    callback to validate VDEV basic params
+ * @mlme_vdev_reset_proto_params:       callback to Reset protocol params
+ * @mlme_vdev_start_send:               callback to initiate actions of VDEV
+ *                                      MLME start operation
+ * @mlme_vdev_restart_send:             callback to initiate actions of VDEV
+ *                                      MLME restart operation
+ * @mlme_vdev_stop_start_send:          callback to block start/restart VDEV
+ *                                      request command
+ * @mlme_vdev_start_continue:           callback to initiate operations on
+ *                                      LMAC/FW start response
+ * @mlme_vdev_up_send:                  callback to initiate actions of VDEV
+ *                                      MLME up operation
+ * @mlme_vdev_notify_up_complete:       callback to notify VDEV MLME on moving
+ *                                      to UP state
+ * @mlme_vdev_update_beacon:            callback to initiate beacon update
+ * @mlme_vdev_disconnect_peers:         callback to initiate disconnection of
+ *                                      peers
+ * @mlme_vdev_dfs_cac_timer_stop:       callback to stop the DFS CAC timer
+ * @mlme_vdev_stop_send:                callback to initiate actions of VDEV
+ *                                      MLME stop operation
+ * @mlme_vdev_stop_continue:            callback to initiate operations on
+ *                                      LMAC/FW stop response
+ * @mlme_vdev_bss_peer_delete_continue: callback to initiate operations on BSS
+ *                                      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
+ *                                      vdev object
+ * @mlme_vdev_legacy_hdl_post_create:   callback to invoke post creation actions
+ *                                      of legacy vdev object
+ * @mlme_vdev_legacy_hdl_destroy:       callback to invoke destroy of legacy
+ *                                      vdev object
+ */
+static struct vdev_mlme_ops sta_mlme_ops = {
+	.mlme_vdev_start_send = sta_mlme_vdev_start_send,
+	.mlme_vdev_restart_send = sta_mlme_vdev_restart_send,
+	.mlme_vdev_start_continue = sta_mlme_vdev_start_continue,
+	.mlme_vdev_sta_conn_start = sta_mlme_vdev_start_connection,
+	.mlme_vdev_up_send = sta_mlme_vdev_up_send,
+	.mlme_vdev_notify_up_complete = sta_mlme_vdev_notify_up_complete,
+	.mlme_vdev_disconnect_peers = sta_mlme_vdev_disconnect_bss,
+	.mlme_vdev_stop_send = sta_mlme_vdev_stop_send,
+	.mlme_vdev_stop_continue = sta_mlme_vdev_stop_continue,
+	.mlme_vdev_down_send = sta_mlme_vdev_down_send,
+	.mlme_vdev_notify_down_complete = sta_vdev_notify_down_complete,
+};
+
+/**
+ * struct ap_mlme_ops - VDEV MLME operation callbacks strucutre for beaconing
+ *                      interface
+ * @mlme_vdev_validate_basic_params:    callback to validate VDEV basic params
+ * @mlme_vdev_reset_proto_params:       callback to Reset protocol params
+ * @mlme_vdev_start_send:               callback to initiate actions of VDEV
+ *                                      MLME start operation
+ * @mlme_vdev_restart_send:             callback to initiate actions of VDEV
+ *                                      MLME restart operation
+ * @mlme_vdev_stop_start_send:          callback to block start/restart VDEV
+ *                                      request command
+ * @mlme_vdev_start_continue:           callback to initiate operations on
+ *                                      LMAC/FW start response
+ * @mlme_vdev_up_send:                  callback to initiate actions of VDEV
+ *                                      MLME up operation
+ * @mlme_vdev_notify_up_complete:       callback to notify VDEV MLME on moving
+ *                                      to UP state
+ * @mlme_vdev_update_beacon:            callback to initiate beacon update
+ * @mlme_vdev_disconnect_peers:         callback to initiate disconnection of
+ *                                      peers
+ * @mlme_vdev_dfs_cac_timer_stop:       callback to stop the DFS CAC timer
+ * @mlme_vdev_stop_send:                callback to initiate actions of VDEV
+ *                                      MLME stop operation
+ * @mlme_vdev_stop_continue:            callback to initiate operations on
+ *                                      LMAC/FW stop response
+ * @mlme_vdev_bss_peer_delete_continue: callback to initiate operations on BSS
+ *                                      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
+ *                                      vdev object
+ * @mlme_vdev_legacy_hdl_post_create:   callback to invoke post creation actions
+ *                                      of legacy vdev object
+ * @mlme_vdev_legacy_hdl_destroy:       callback to invoke destroy of legacy
+ *                                      vdev object
+ */
+static struct vdev_mlme_ops ap_mlme_ops = {
+	.mlme_vdev_start_send = ap_mlme_vdev_start_send,
+	.mlme_vdev_restart_send = ap_mlme_vdev_restart_send,
+	.mlme_vdev_stop_start_send = ap_mlme_vdev_stop_start_send,
+	.mlme_vdev_start_continue = ap_mlme_vdev_start_continue,
+	.mlme_vdev_start_req_failed = ap_mlme_vdev_start_req_failed,
+	.mlme_vdev_up_send = ap_mlme_vdev_up_send,
+	.mlme_vdev_notify_up_complete = ap_mlme_vdev_notify_up_complete,
+	.mlme_vdev_update_beacon = ap_mlme_vdev_update_beacon,
+	.mlme_vdev_disconnect_peers = ap_mlme_vdev_disconnect_peers,
+	.mlme_vdev_disconnect_peers = ap_vdev_dfs_cac_timer_stop,
+	.mlme_vdev_stop_send = ap_mlme_vdev_stop_send,
+	.mlme_vdev_stop_continue = ap_mlme_vdev_stop_continue,
+	.mlme_vdev_down_send = ap_mlme_vdev_down_send,
+	.mlme_vdev_notify_down_complete = ap_vdev_notify_down_complete,
+	.mlme_vdev_legacy_hdl_create = ap_mlme_vdev_legacy_hdl_create,
+	.mlme_vdev_legacy_hdl_destroy = ap_mlme_vdev_legacy_hdl_destroy,
+};

+ 49 - 0
components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h

@@ -66,6 +66,55 @@ QDF_STATUS ucfg_mlme_psoc_open(struct wlan_objmgr_psoc *psoc);
  */
 void ucfg_mlme_psoc_close(struct wlan_objmgr_psoc *psoc);
 
+#ifdef CONFIG_VDEV_SM
+/**
+ * ucfg_mlme_pdev_open() - MLME component pdev Open
+ * @pdev: pointer to pdev object
+ *
+ * Open the MLME component and initialize the MLME pdev strucutre
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS ucfg_mlme_pdev_open(struct wlan_objmgr_pdev *pdev);
+
+/**
+ * ucfg_mlme_pdev_close() - MLME component pdev close
+ * @pdev: pointer to pdev object
+ *
+ * close the MLME pdev information
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS ucfg_mlme_pdev_close(struct wlan_objmgr_pdev *pdev);
+
+#else
+/**
+ * ucfg_mlme_pdev_open() - MLME component pdev Open
+ * @pdev: pointer to pdev object
+ *
+ * Open the MLME component and initialize the MLME pdev strucutre
+ *
+ * Return: QDF Status
+ */
+static inline QDF_STATUS ucfg_mlme_pdev_open(struct wlan_objmgr_pdev *pdev)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * ucfg_mlme_pdev_close() - MLME component pdev close
+ * @pdev: pointer to pdev object
+ *
+ * close the MLME pdev information
+ *
+ * Return: QDF Status
+ */
+static inline QDF_STATUS ucfg_mlme_pdev_close(struct wlan_objmgr_pdev *pdev)
+{
+	return QDF_STATUS_SUCCESS;
+}
+#endif
+
 /**
  * ucfg_mlme_get_ht_cap_info() - Get the HT cap info config
  * @psoc: pointer to psoc object

+ 16 - 0
components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c

@@ -22,6 +22,8 @@
 #include "wlan_mlme_main.h"
 #include "wlan_mlme_api.h"
 #include "wlan_mlme_ucfg_api.h"
+#include "wlan_objmgr_pdev_obj.h"
+#include "wlan_mlme_vdev_mgr_interface.h"
 
 QDF_STATUS ucfg_mlme_init(void)
 {
@@ -84,3 +86,17 @@ void ucfg_mlme_psoc_close(struct wlan_objmgr_psoc *psoc)
 {
 	/* Clear the MLME CFG Structure */
 }
+
+#ifdef CONFIG_VDEV_SM
+QDF_STATUS ucfg_mlme_pdev_open(struct wlan_objmgr_pdev *pdev)
+{
+	pdev->pdev_mlme.mlme_register_ops = mlme_register_vdev_mgr_ops;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS ucfg_mlme_pdev_close(struct wlan_objmgr_pdev *pdev)
+{
+	return QDF_STATUS_SUCCESS;
+}
+#endif

+ 14 - 0
core/hdd/inc/wlan_hdd_main.h

@@ -3270,6 +3270,20 @@ void hdd_component_psoc_enable(struct wlan_objmgr_psoc *psoc);
  */
 void hdd_component_psoc_disable(struct wlan_objmgr_psoc *psoc);
 
+/**
+ * hdd_component_pdev_open() - Trigger pdev open for CLD Components
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS hdd_component_pdev_open(struct wlan_objmgr_pdev *pdev);
+
+/**
+ * hdd_component_pdev_close() - Trigger pdev close for CLD Components
+ *
+ * Return: None
+ */
+void hdd_component_pdev_close(struct wlan_objmgr_pdev *pdev);
+
 #ifdef WLAN_FEATURE_MEMDUMP_ENABLE
 int hdd_driver_memdump_init(void);
 void hdd_driver_memdump_deinit(void);

+ 17 - 1
core/hdd/src/wlan_hdd_main.c

@@ -1917,6 +1917,12 @@ void hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg)
 		return;
 	}
 
+	status = hdd_component_pdev_open(hdd_ctx->pdev);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		QDF_DEBUG_PANIC("hdd component pdev open failed; status:%d",
+				status);
+		return;
+	}
 	cdp_pdev_set_ctrl_pdev(cds_get_context(QDF_MODULE_ID_SOC),
 			cds_get_context(QDF_MODULE_ID_TXRX),
 			(struct cdp_ctrl_objmgr_pdev *)hdd_ctx->pdev);
@@ -11003,7 +11009,7 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode)
 		ret = -EINVAL;
 		QDF_ASSERT(0);
 	}
-
+	hdd_component_pdev_close(hdd_ctx->pdev);
 	hdd_component_psoc_close(hdd_ctx->hdd_psoc);
 	dispatcher_pdev_close(hdd_ctx->pdev);
 	ret = hdd_objmgr_release_and_destroy_pdev(hdd_ctx);
@@ -12603,6 +12609,16 @@ void hdd_component_psoc_disable(struct wlan_objmgr_psoc *psoc)
 	ocb_psoc_disable(psoc);
 }
 
+QDF_STATUS hdd_component_pdev_open(struct wlan_objmgr_pdev *pdev)
+{
+	return ucfg_mlme_pdev_open(pdev);
+}
+
+void hdd_component_pdev_close(struct wlan_objmgr_pdev *pdev)
+{
+	ucfg_mlme_pdev_close(pdev);
+}
+
 /**
  * __hdd_module_init - Module init helper
  *