qcacld-3.0: Move psoc object to common component
Move to the common psoc object and retrieve the cfg ini information from the legacy implementation. Change-Id: I38147c748796550f2adede44b681559a4f329fbf CRs-Fixed: 2547536
This commit is contained in:
parent
1a5e992075
commit
a43590e897
7
Kbuild
7
Kbuild
@ -963,7 +963,8 @@ endif
|
||||
UMAC_MLME_INC := -I$(WLAN_COMMON_INC)/umac/mlme \
|
||||
-I$(WLAN_COMMON_INC)/umac/mlme/mlme_objmgr/dispatcher/inc \
|
||||
-I$(WLAN_COMMON_INC)/umac/mlme/vdev_mgr/dispatcher/inc \
|
||||
-I$(WLAN_COMMON_INC)/umac/mlme/pdev_mgr/dispatcher/inc
|
||||
-I$(WLAN_COMMON_INC)/umac/mlme/pdev_mgr/dispatcher/inc \
|
||||
-I$(WLAN_COMMON_INC)/umac/mlme/psoc_mgr/dispatcher/inc
|
||||
|
||||
UMAC_MLME_OBJS := $(WLAN_COMMON_ROOT)/umac/mlme/mlme_objmgr/dispatcher/src/wlan_vdev_mlme_main.o \
|
||||
$(WLAN_COMMON_ROOT)/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.o \
|
||||
@ -975,7 +976,9 @@ UMAC_MLME_OBJS := $(WLAN_COMMON_ROOT)/umac/mlme/mlme_objmgr/dispatcher/src/wlan_
|
||||
$(WLAN_COMMON_ROOT)/umac/mlme/vdev_mgr/dispatcher/src/wlan_vdev_mgr_utils_api.o \
|
||||
$(WLAN_COMMON_ROOT)/umac/mlme/mlme_objmgr/dispatcher/src/wlan_cmn_mlme_main.o \
|
||||
$(WLAN_COMMON_ROOT)/umac/mlme/mlme_objmgr/dispatcher/src/wlan_pdev_mlme_main.o \
|
||||
$(WLAN_COMMON_ROOT)/umac/mlme/pdev_mgr/dispatcher/src/wlan_pdev_mlme_api.o
|
||||
$(WLAN_COMMON_ROOT)/umac/mlme/pdev_mgr/dispatcher/src/wlan_pdev_mlme_api.o \
|
||||
$(WLAN_COMMON_ROOT)/umac/mlme/mlme_objmgr/dispatcher/src/wlan_psoc_mlme_main.o \
|
||||
$(WLAN_COMMON_ROOT)/umac/mlme/psoc_mgr/dispatcher/src/wlan_psoc_mlme_api.o
|
||||
|
||||
######## MLME ##############
|
||||
MLME_DIR := components/mlme
|
||||
|
@ -36,10 +36,10 @@
|
||||
#define mlme_legacy_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_MLME, params)
|
||||
|
||||
/**
|
||||
* struct wlan_mlme_psoc_obj -MLME psoc priv object
|
||||
* struct wlan_mlme_psoc_ext_obj -MLME ext psoc priv object
|
||||
* @cfg: cfg items
|
||||
*/
|
||||
struct wlan_mlme_psoc_obj {
|
||||
struct wlan_mlme_psoc_ext_obj {
|
||||
struct wlan_mlme_cfg cfg;
|
||||
};
|
||||
|
||||
@ -270,32 +270,6 @@ struct wlan_mlme_nss_chains *mlme_get_ini_vdev_config(
|
||||
struct mlme_roam_after_data_stall *
|
||||
mlme_get_roam_invoke_params(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* mlme_psoc_object_created_notification(): mlme psoc create handler
|
||||
* @psoc: psoc which is going to created by objmgr
|
||||
* @arg: argument for vdev create handler
|
||||
*
|
||||
* Register this api with objmgr to detect psoc is created
|
||||
*
|
||||
* Return: QDF_STATUS status in case of success else return error
|
||||
*/
|
||||
QDF_STATUS
|
||||
mlme_psoc_object_created_notification(struct wlan_objmgr_psoc *psoc,
|
||||
void *arg);
|
||||
|
||||
/**
|
||||
* mlme_psoc_object_destroyed_notification(): mlme psoc delete handler
|
||||
* @psoc: psoc which is going to delete by objmgr
|
||||
* @arg: argument for vdev delete handler
|
||||
*
|
||||
* Register this api with objmgr to detect psoc is deleted
|
||||
*
|
||||
* Return: QDF_STATUS status in case of success else return error
|
||||
*/
|
||||
QDF_STATUS
|
||||
mlme_psoc_object_destroyed_notification(struct wlan_objmgr_psoc *psoc,
|
||||
void *arg);
|
||||
|
||||
/**
|
||||
* mlme_cfg_on_psoc_enable() - Populate MLME structure from CFG and INI
|
||||
* @psoc: pointer to the psoc object
|
||||
@ -307,17 +281,19 @@ mlme_psoc_object_destroyed_notification(struct wlan_objmgr_psoc *psoc,
|
||||
QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* mlme_get_psoc_obj() - Get MLME object from psoc
|
||||
* mlme_get_psoc_ext_obj() - Get MLME object from psoc
|
||||
* @psoc: pointer to the psoc object
|
||||
*
|
||||
* Get the MLME object pointer from the psoc
|
||||
*
|
||||
* Return: pointer to MLME object
|
||||
*/
|
||||
#define mlme_get_psoc_obj(psoc) mlme_get_psoc_obj_fl(psoc, __func__, __LINE__)
|
||||
struct wlan_mlme_psoc_obj *mlme_get_psoc_obj_fl(struct wlan_objmgr_psoc *psoc,
|
||||
const char *func,
|
||||
uint32_t line);
|
||||
#define mlme_get_psoc_ext_obj(psoc) \
|
||||
mlme_get_psoc_ext_obj_fl(psoc, __func__, __LINE__)
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_get_psoc_ext_obj_fl(struct wlan_objmgr_psoc
|
||||
*psoc,
|
||||
const char *func,
|
||||
uint32_t line);
|
||||
|
||||
/**
|
||||
* mlme_init_ibss_cfg() - Init IBSS config data structure with default CFG value
|
||||
|
@ -24,24 +24,19 @@
|
||||
#include "cfg_ucfg_api.h"
|
||||
#include "wmi_unified.h"
|
||||
#include "wlan_scan_public_structs.h"
|
||||
#include "wlan_psoc_mlme_api.h"
|
||||
#include "wlan_vdev_mlme_api.h"
|
||||
#include "wlan_mlme_api.h"
|
||||
#include <wlan_crypto_global_api.h>
|
||||
|
||||
#define NUM_OF_SOUNDING_DIMENSIONS 1 /*Nss - 1, (Nss = 2 for 2x2)*/
|
||||
|
||||
struct wlan_mlme_psoc_obj *mlme_get_psoc_obj_fl(struct wlan_objmgr_psoc *psoc,
|
||||
const char *func, uint32_t line)
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_get_psoc_ext_obj_fl(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
const char *func, uint32_t line)
|
||||
{
|
||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||
|
||||
mlme_obj = (struct wlan_mlme_psoc_obj *)
|
||||
wlan_objmgr_psoc_get_comp_private_obj(psoc,
|
||||
WLAN_UMAC_COMP_MLME);
|
||||
if (!mlme_obj)
|
||||
mlme_legacy_err("mlme obj is null, %s:%d", func, line);
|
||||
|
||||
return mlme_obj;
|
||||
return wlan_psoc_mlme_get_ext_hdl(psoc);
|
||||
}
|
||||
|
||||
struct wlan_mlme_nss_chains *mlme_get_dynamic_vdev_config(
|
||||
@ -99,55 +94,6 @@ uint8_t *mlme_get_dynamic_oce_flags(struct wlan_objmgr_vdev *vdev)
|
||||
return &mlme_priv->sta_dynamic_oce_value;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
mlme_psoc_object_created_notification(struct wlan_objmgr_psoc *psoc,
|
||||
void *arg)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||
|
||||
mlme_obj = qdf_mem_malloc(sizeof(struct wlan_mlme_psoc_obj));
|
||||
if (!mlme_obj) {
|
||||
mlme_legacy_err("Failed to allocate memory");
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
status = wlan_objmgr_psoc_component_obj_attach(psoc,
|
||||
WLAN_UMAC_COMP_MLME,
|
||||
mlme_obj,
|
||||
QDF_STATUS_SUCCESS);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
mlme_legacy_err("Failed to attach psoc_ctx with psoc");
|
||||
qdf_mem_free(mlme_obj);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
mlme_psoc_object_destroyed_notification(struct wlan_objmgr_psoc *psoc,
|
||||
void *arg)
|
||||
{
|
||||
struct wlan_mlme_psoc_obj *mlme_obj = NULL;
|
||||
QDF_STATUS status;
|
||||
|
||||
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||
|
||||
status = wlan_objmgr_psoc_component_obj_detach(psoc,
|
||||
WLAN_UMAC_COMP_MLME,
|
||||
mlme_obj);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
mlme_legacy_err("Failed to detach psoc_ctx from psoc");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
qdf_mem_free(mlme_obj);
|
||||
|
||||
out:
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifdef CRYPTO_SET_KEY_CONVERGED
|
||||
QDF_STATUS mlme_get_peer_mic_len(struct wlan_objmgr_psoc *psoc, uint8_t pdev_id,
|
||||
uint8_t *peer_mac, uint8_t *mic_len,
|
||||
@ -2405,11 +2351,11 @@ mlme_init_dot11_mode_cfg(struct wlan_mlme_dot11_mode *dot11_mode)
|
||||
|
||||
QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
struct wlan_mlme_cfg *mlme_cfg;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
mlme_legacy_err("Failed to get MLME Obj");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "lim_types.h"
|
||||
#include <include/wlan_mlme_cmn.h>
|
||||
#include <../../core/src/vdev_mgr_ops.h>
|
||||
#include "wlan_psoc_mlme_api.h"
|
||||
|
||||
static struct vdev_mlme_ops sta_mlme_ops;
|
||||
static struct vdev_mlme_ops ap_mlme_ops;
|
||||
@ -1047,6 +1048,47 @@ vdevmgr_vdev_stop_rsp_handle(struct vdev_mlme_obj *vdev_mlme,
|
||||
return wma_vdev_stop_resp_handler(vdev_mlme, rsp);
|
||||
}
|
||||
|
||||
/**
|
||||
* psoc_mlme_ext_hdl_create() - Create mlme legacy priv object
|
||||
* @psoc_mlme: psoc mlme object
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static
|
||||
QDF_STATUS psoc_mlme_ext_hdl_create(struct psoc_mlme_obj *psoc_mlme)
|
||||
{
|
||||
psoc_mlme->ext_psoc_ptr =
|
||||
qdf_mem_malloc(sizeof(struct wlan_mlme_psoc_ext_obj));
|
||||
if (!psoc_mlme->ext_psoc_ptr) {
|
||||
mlme_legacy_err("Failed to allocate memory");
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* psoc_mlme_ext_hdl_destroy() - Destroy mlme legacy priv object
|
||||
* @psoc_mlme: psoc mlme object
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static
|
||||
QDF_STATUS psoc_mlme_ext_hdl_destroy(struct psoc_mlme_obj *psoc_mlme)
|
||||
{
|
||||
if (!psoc_mlme) {
|
||||
mlme_err("PSOC MLME is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (psoc_mlme->ext_psoc_ptr) {
|
||||
qdf_mem_free(psoc_mlme->ext_psoc_ptr);
|
||||
psoc_mlme->ext_psoc_ptr = NULL;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* vdevmgr_vdev_delete_rsp_handle() - callback to handle vdev delete response
|
||||
* @vdev_mlme: vdev mlme object
|
||||
@ -1209,13 +1251,19 @@ static struct vdev_mlme_ops mon_mlme_ops = {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct mlme_ext_ops - VDEV MLME legacy global callbacks structure
|
||||
* struct mlme_ext_ops - MLME legacy global callbacks structure
|
||||
* @mlme_psoc_ext_hdl_create: callback to invoke creation of legacy
|
||||
* psoc object
|
||||
* @mlme_psoc_ext_hdl_destroy: callback to invoke destroy of legacy
|
||||
* psoc object
|
||||
* @mlme_vdev_ext_hdl_create: callback to invoke creation of legacy
|
||||
* vdev object
|
||||
* @mlme_vdev_ext_hdl_destroy: callback to invoke destroy of legacy
|
||||
* vdev object
|
||||
*/
|
||||
static struct mlme_ext_ops ext_ops = {
|
||||
.mlme_psoc_ext_hdl_create = psoc_mlme_ext_hdl_create,
|
||||
.mlme_psoc_ext_hdl_destroy = psoc_mlme_ext_hdl_destroy,
|
||||
.mlme_vdev_ext_hdl_create = vdevmgr_mlme_ext_hdl_create,
|
||||
.mlme_vdev_ext_hdl_destroy = vdevmgr_mlme_ext_hdl_destroy,
|
||||
};
|
||||
|
@ -40,4 +40,10 @@ typedef struct opaque_mlme_pdev_ext mlme_pdev_ext_t;
|
||||
*/
|
||||
typedef struct mlme_legacy_priv mlme_vdev_ext_t;
|
||||
|
||||
/**
|
||||
* typedef mlme_psoc_ext_t - Definition of psoc mlme pointer
|
||||
* Define ext_psoc_ptr from external umac/mlme component point to this type
|
||||
*/
|
||||
typedef struct wlan_mlme_psoc_ext_obj mlme_psoc_ext_t;
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -34,6 +34,7 @@
|
||||
#include "sys_entry_func.h"
|
||||
#include "mac_init_api.h"
|
||||
#include "wlan_mlme_main.h"
|
||||
#include "wlan_psoc_mlme_api.h"
|
||||
|
||||
#ifdef TRACE_RECORD
|
||||
#include "mac_trace.h"
|
||||
@ -101,7 +102,7 @@ QDF_STATUS mac_open(struct wlan_objmgr_psoc *psoc, mac_handle_t *mac_handle,
|
||||
{
|
||||
struct mac_context *mac;
|
||||
QDF_STATUS status;
|
||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_ext_obj;
|
||||
|
||||
QDF_BUG(mac_handle);
|
||||
if (!mac_handle)
|
||||
@ -125,13 +126,13 @@ QDF_STATUS mac_open(struct wlan_objmgr_psoc *psoc, mac_handle_t *mac_handle,
|
||||
}
|
||||
|
||||
mac->psoc = psoc;
|
||||
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
mlme_ext_obj = wlan_psoc_mlme_get_ext_hdl(psoc);
|
||||
if (!mlme_ext_obj) {
|
||||
pe_err("Failed to get MLME Obj");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto release_psoc_ref;
|
||||
}
|
||||
mac->mlme_cfg = &mlme_obj->cfg;
|
||||
mac->mlme_cfg = &mlme_ext_obj->cfg;
|
||||
|
||||
*mac_handle = MAC_HANDLE(mac);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user