qcacmn: Rename mlme_cm_* apis to cm_* apis

Rename connection manager mlme_cm_* apis to cm_* apis.

Change-Id: I90129b2b71b121dd684890677d2d23e921a57574
CRs-Fixed: 2740376
This commit is contained in:
Abhishek Singh 2020-07-24 18:41:19 +05:30 • committed by snandini
commit 9d14f9d71a
7 changed files with 298 additions and 298 deletions

View file

@ -21,7 +21,7 @@
#include "wlan_cm_main.h"
#include "wlan_cm_sm.h"
QDF_STATUS mlme_cm_init(struct vdev_mlme_obj *vdev_mlme)
QDF_STATUS wlan_cm_init(struct vdev_mlme_obj *vdev_mlme)
{
struct wlan_objmgr_vdev *vdev = vdev_mlme->vdev;
enum QDF_OPMODE op_mode = wlan_vdev_mlme_get_opmode(vdev);
@ -35,7 +35,7 @@ QDF_STATUS mlme_cm_init(struct vdev_mlme_obj *vdev_mlme)
return QDF_STATUS_E_NOMEM;
vdev_mlme->cnx_mgr_ctx->vdev = vdev_mlme->vdev;
status = mlme_cm_sm_create(vdev_mlme->cnx_mgr_ctx);
status = cm_sm_create(vdev_mlme->cnx_mgr_ctx);
if (QDF_IS_STATUS_ERROR(status)) {
mlme_err("CM MLME SM allocation failed");
qdf_mem_free(vdev_mlme->cnx_mgr_ctx);
@ -47,7 +47,7 @@ QDF_STATUS mlme_cm_init(struct vdev_mlme_obj *vdev_mlme)
return QDF_STATUS_SUCCESS;
}
QDF_STATUS mlme_cm_deinit(struct vdev_mlme_obj *vdev_mlme)
QDF_STATUS wlan_cm_deinit(struct vdev_mlme_obj *vdev_mlme)
{
struct wlan_objmgr_vdev *vdev = vdev_mlme->vdev;
enum QDF_OPMODE op_mode = wlan_vdev_mlme_get_opmode(vdev);
@ -56,7 +56,7 @@ QDF_STATUS mlme_cm_deinit(struct vdev_mlme_obj *vdev_mlme)
return QDF_STATUS_SUCCESS;
qdf_list_destroy(&vdev_mlme->cnx_mgr_ctx->req_list);
mlme_cm_sm_destroy(vdev_mlme->cnx_mgr_ctx);
cm_sm_destroy(vdev_mlme->cnx_mgr_ctx);
qdf_mem_free(vdev_mlme->cnx_mgr_ctx);
vdev_mlme->cnx_mgr_ctx = NULL;

View file

@ -235,7 +235,7 @@ struct cnx_mgr {
};
/**
* mlme_cm_init() - Invoke connection manager init
* wlan_cm_init() - Invoke connection manager init
* @vdev_mlme_obj: VDEV MLME comp object
*
* API allocates CM and init
@ -243,10 +243,10 @@ struct cnx_mgr {
* Return: SUCCESS on successful allocation
* FAILURE, if registration fails
*/
QDF_STATUS mlme_cm_init(struct vdev_mlme_obj *vdev_mlme);
QDF_STATUS wlan_cm_init(struct vdev_mlme_obj *vdev_mlme);
/**
* mlme_cm_deinit() - Invoke connection manager deinit
* wlan_cm_deinit() - Invoke connection manager deinit
* @vdev_mlme_obj: VDEV MLME comp object
*
* API destroys CM
@ -254,15 +254,15 @@ QDF_STATUS mlme_cm_init(struct vdev_mlme_obj *vdev_mlme);
* Return: SUCCESS on successful deletion
* FAILURE, if deletion fails
*/
QDF_STATUS mlme_cm_deinit(struct vdev_mlme_obj *vdev_mlme);
QDF_STATUS wlan_cm_deinit(struct vdev_mlme_obj *vdev_mlme);
#else
static inline QDF_STATUS mlme_cm_init(struct vdev_mlme_obj *vdev_mlme)
static inline QDF_STATUS wlan_cm_init(struct vdev_mlme_obj *vdev_mlme)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS mlme_cm_deinit(struct vdev_mlme_obj *vdev_mlme)
static inline QDF_STATUS wlan_cm_deinit(struct vdev_mlme_obj *vdev_mlme)
{
return QDF_STATUS_SUCCESS;
}

View file

@ -22,22 +22,21 @@
#include "wlan_cm_roam_sm.h"
#include "wlan_cm_sm.h"
void mlme_cm_state_roaming_entry(void *ctx)
void cm_state_roaming_entry(void *ctx)
{
struct cnx_mgr *cm_ctx = (struct cnx_mgr *)ctx;
struct cnx_mgr *cm_ctx = ctx;
mlme_cm_sm_state_update(cm_ctx, WLAN_CM_S_ROAMING, WLAN_CM_SS_IDLE);
cm_sm_state_update(cm_ctx, WLAN_CM_S_ROAMING, WLAN_CM_SS_IDLE);
}
void mlme_cm_state_roaming_exit(void *ctx)
void cm_state_roaming_exit(void *ctx)
{
}
bool mlme_cm_state_roaming_event(void *ctx, uint16_t event,
uint16_t event_data_len,
void *event_data)
bool cm_state_roaming_event(void *ctx, uint16_t event, uint16_t data_len,
void *data)
{
// struct cnx_mgr *cm_ctx = (struct cnx_mgr *)ctx;
// struct cnx_mgr *cm_ctx = ctx;
bool status;
switch (event) {
@ -51,25 +50,24 @@ bool mlme_cm_state_roaming_event(void *ctx, uint16_t event,
#ifdef WLAN_FEATURE_HOST_ROAM
#ifdef WLAN_FEATURE_PREAUTH_ENABLE
void mlme_cm_subst_preauth_entry(void *ctx)
void cm_subst_preauth_entry(void *ctx)
{
struct cnx_mgr *cm_ctx = (struct cnx_mgr *)ctx;
struct cnx_mgr *cm_ctx = ctx;
if (mlme_cm_get_state(cm_ctx) != WLAN_CM_S_ROAMING)
if (cm_get_state(cm_ctx) != WLAN_CM_S_ROAMING)
QDF_BUG(0);
mlme_cm_set_substate(cm_ctx, WLAN_CM_SS_PREAUTH);
cm_set_substate(cm_ctx, WLAN_CM_SS_PREAUTH);
}
void mlme_cm_subst_preauth_exit(void *ctx)
void cm_subst_preauth_exit(void *ctx)
{
}
bool mlme_cm_subst_preauth_event(void *ctx, uint16_t event,
uint16_t event_data_len,
void *event_data)
bool cm_subst_preauth_event(void *ctx, uint16_t event, uint16_t data_len,
void *data)
{
// struct cnx_mgr *cm_ctx = (struct cnx_mgr *)ctx;
// struct cnx_mgr *cm_ctx = ctx;
bool status;
switch (event) {
@ -83,25 +81,24 @@ bool mlme_cm_subst_preauth_event(void *ctx, uint16_t event,
#endif /* WLAN_FEATURE_PREAUTH_ENABLE */
void mlme_cm_subst_reassoc_entry(void *ctx)
void cm_subst_reassoc_entry(void *ctx)
{
struct cnx_mgr *cm_ctx = (struct cnx_mgr *)ctx;
struct cnx_mgr *cm_ctx = ctx;
if (mlme_cm_get_state(cm_ctx) != WLAN_CM_S_ROAMING)
if (cm_get_state(cm_ctx) != WLAN_CM_S_ROAMING)
QDF_BUG(0);
mlme_cm_set_substate(cm_ctx, WLAN_CM_SS_REASSOC);
cm_set_substate(cm_ctx, WLAN_CM_SS_REASSOC);
}
void mlme_cm_subst_reassoc_exit(void *ctx)
void cm_subst_reassoc_exit(void *ctx)
{
}
bool mlme_cm_subst_reassoc_event(void *ctx, uint16_t event,
uint16_t event_data_len,
void *event_data)
bool cm_subst_reassoc_event(void *ctx, uint16_t event, uint16_t data_len,
void *data)
{
// struct cnx_mgr *cm_ctx = (struct cnx_mgr *)ctx;
// struct cnx_mgr *cm_ctx = ctx;
bool status;
switch (event) {
@ -116,25 +113,24 @@ bool mlme_cm_subst_reassoc_event(void *ctx, uint16_t event,
#endif /* WLAN_FEATURE_HOST_ROAM */
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
void mlme_cm_subst_roam_start_entry(void *ctx)
void cm_subst_roam_start_entry(void *ctx)
{
struct cnx_mgr *cm_ctx = (struct cnx_mgr *)ctx;
struct cnx_mgr *cm_ctx = ctx;
if (mlme_cm_get_state(cm_ctx) != WLAN_CM_S_ROAMING)
if (cm_get_state(cm_ctx) != WLAN_CM_S_ROAMING)
QDF_BUG(0);
mlme_cm_set_substate(cm_ctx, WLAN_CM_SS_ROAM_STARTED);
cm_set_substate(cm_ctx, WLAN_CM_SS_ROAM_STARTED);
}
void mlme_cm_subst_roam_start_exit(void *ctx)
void cm_subst_roam_start_exit(void *ctx)
{
}
bool mlme_cm_subst_roam_start_event(void *ctx, uint16_t event,
uint16_t event_data_len,
void *event_data)
bool cm_subst_roam_start_event(void *ctx, uint16_t event, uint16_t data_len,
void *data)
{
// struct cnx_mgr *cm_ctx = (struct cnx_mgr *)ctx;
// struct cnx_mgr *cm_ctx = ctx;
bool status;
switch (event) {
@ -146,25 +142,24 @@ bool mlme_cm_subst_roam_start_event(void *ctx, uint16_t event,
return status;
}
void mlme_cm_subst_roam_sync_entry(void *ctx)
void cm_subst_roam_sync_entry(void *ctx)
{
struct cnx_mgr *cm_ctx = (struct cnx_mgr *)ctx;
struct cnx_mgr *cm_ctx = ctx;
if (mlme_cm_get_state(cm_ctx) != WLAN_CM_S_ROAMING)
if (cm_get_state(cm_ctx) != WLAN_CM_S_ROAMING)
QDF_BUG(0);
mlme_cm_set_substate(cm_ctx, WLAN_CM_SS_ROAM_SYNC);
cm_set_substate(cm_ctx, WLAN_CM_SS_ROAM_SYNC);
}
void mlme_cm_subst_roam_sync_exit(void *ctx)
void cm_subst_roam_sync_exit(void *ctx)
{
}
bool mlme_cm_subst_roam_sync_event(void *ctx, uint16_t event,
uint16_t event_data_len,
void *event_data)
bool cm_subst_roam_sync_event(void *ctx, uint16_t event, uint16_t data_len,
void *data)
{
// struct cnx_mgr *cm_ctx = (struct cnx_mgr *)ctx;
// struct cnx_mgr *cm_ctx = ctx;
bool status;
switch (event) {

View file

@ -24,7 +24,7 @@
#define __WLAN_CM_ROAM_SM_H__
/**
* mlme_cm_state_roaming_entry() - Entry API for roaming state for
* cm_state_roaming_entry() - Entry API for roaming state for
* connection mgr
* @ctx: connection manager ctx
*
@ -32,35 +32,37 @@
*
* Return: void
*/
void mlme_cm_state_roaming_entry(void *ctx);
void cm_state_roaming_entry(void *ctx);
/**
* mlme_cm_state_roaming_exit() - Exit API for roaming state for connection mgr
* cm_state_roaming_exit() - Exit API for roaming state for connection mgr
* @ctx: connection manager ctx
*
* API to perform operations on exiting from roaming state
*
* Return: void
*/
void mlme_cm_state_roaming_exit(void *ctx);
void cm_state_roaming_exit(void *ctx);
/**
* mlme_cm_state_roaming_event() - Roaming State event handler for
* cm_state_roaming_event() - Roaming State event handler for
* connection mgr
* @ctx: connection manager ctx
* @event: event to handle
* @data_len: event data len
* @data:event data
*
* API to handle events in roaming state
*
* Return: bool
*/
bool mlme_cm_state_roaming_event(void *ctx, uint16_t event,
uint16_t event_data_len,
void *event_data);
bool cm_state_roaming_event(void *ctx, uint16_t event, uint16_t data_len,
void *data);
#ifdef WLAN_FEATURE_HOST_ROAM
#ifdef WLAN_FEATURE_PREAUTH_ENABLE
/**
* mlme_cm_subst_preauth_entry() - Entry API for preauth sub-state for
* cm_subst_preauth_entry() - Entry API for preauth sub-state for
* connection mgr
* @ctx: connection manager ctx
*
@ -68,10 +70,10 @@ bool mlme_cm_state_roaming_event(void *ctx, uint16_t event,
*
* Return: void
*/
void mlme_cm_subst_preauth_entry(void *ctx);
void cm_subst_preauth_entry(void *ctx);
/**
* mlme_cm_subst_preauth_exit() - Exit API for preauth sub-state for
* cm_subst_preauth_exit() - Exit API for preauth sub-state for
* connection mgr
* @ctx: connection manager ctx
*
@ -79,36 +81,37 @@ void mlme_cm_subst_preauth_entry(void *ctx);
*
* Return: void
*/
void mlme_cm_subst_preauth_exit(void *ctx);
void cm_subst_preauth_exit(void *ctx);
/**
* mlme_cm_subst_preauth_event() - Preauth sub-state event handler for
* cm_subst_preauth_event() - Preauth sub-state event handler for
* connection mgr
* @ctx: connection manager ctx
* @event: event to handle
* @data_len: event data len
* @data:event data
*
* API to handle events in preauth sub-state
*
* Return: bool
*/
bool mlme_cm_subst_preauth_event(void *ctx, uint16_t event,
uint16_t event_data_len,
void *event_data);
bool cm_subst_preauth_event(void *ctx, uint16_t event,
uint16_t data_len, void *data);
#else /* WLAN_FEATURE_PREAUTH_ENABLE && WLAN_FEATURE_HOST_ROAM */
static inline void mlme_cm_subst_preauth_entry(void *ctx) {}
static inline void cm_subst_preauth_entry(void *ctx) {}
static inline void mlme_cm_subst_preauth_exit(void *ctx) {}
static inline void cm_subst_preauth_exit(void *ctx) {}
static inline bool mlme_cm_subst_preauth_event(void *ctx, uint16_t event,
uint16_t event_data_len,
void *event_data)
static inline bool cm_subst_preauth_event(void *ctx, uint16_t event,
uint16_t data_len, void *data)
{
return true;
}
#endif /* WLAN_FEATURE_PREAUTH_ENABLE */
/**
* mlme_cm_subst_reassoc_entry() - Entry API for reassoc sub-state for
* cm_subst_reassoc_entry() - Entry API for reassoc sub-state for
* connection mgr
* @ctx: connection manager ctx
*
@ -116,10 +119,10 @@ static inline bool mlme_cm_subst_preauth_event(void *ctx, uint16_t event,
*
* Return: void
*/
void mlme_cm_subst_reassoc_entry(void *ctx);
void cm_subst_reassoc_entry(void *ctx);
/**
* mlme_cm_subst_reassoc_exit() - Exit API for reassoc sub-state for
* cm_subst_reassoc_exit() - Exit API for reassoc sub-state for
* connection mgr
* @ctx: connection manager ctx
*
@ -127,26 +130,28 @@ void mlme_cm_subst_reassoc_entry(void *ctx);
*
* Return: void
*/
void mlme_cm_subst_reassoc_exit(void *ctx);
void cm_subst_reassoc_exit(void *ctx);
/**
* mlme_cm_subst_reassoc_event() - Reassoc sub-state event handler for
* cm_subst_reassoc_event() - Reassoc sub-state event handler for
* connection mgr
* @ctx: connection manager ctx
* @event: event to handle
* @data_len: event data len
* @data:event data
*
* API to handle events in preauth sub-state
*
* Return: bool
*/
bool mlme_cm_subst_reassoc_event(void *ctx, uint16_t event,
uint16_t event_data_len,
void *event_data);
bool cm_subst_reassoc_event(void *ctx, uint16_t event, uint16_t data_len,
void *data);
#endif /* WLAN_FEATURE_HOST_ROAM */
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
/**
* mlme_cm_subst_roam_start_entry() - Entry API for roam start sub-state for
* cm_subst_roam_start_entry() - Entry API for roam start sub-state for
* connection mgr
* @ctx: connection manager ctx
*
@ -154,10 +159,10 @@ bool mlme_cm_subst_reassoc_event(void *ctx, uint16_t event,
*
* Return: void
*/
void mlme_cm_subst_roam_start_entry(void *ctx);
void cm_subst_roam_start_entry(void *ctx);
/**
* mlme_cm_subst_roam_start_exit() - Exit API for roam start sub-state for
* cm_subst_roam_start_exit() - Exit API for roam start sub-state for
* connection mgr
* @ctx: connection manager ctx
*
@ -165,23 +170,25 @@ void mlme_cm_subst_roam_start_entry(void *ctx);
*
* Return: void
*/
void mlme_cm_subst_roam_start_exit(void *ctx);
void cm_subst_roam_start_exit(void *ctx);
/**
* mlme_cm_subst_roam_start_event() - Roam start sub-state event handler for
* cm_subst_roam_start_event() - Roam start sub-state event handler for
* connection mgr
* @ctx: connection manager ctx
* @event: event to handle
* @data_len: event data len
* @data:event data
*
* API to handle events in roam start sub-state
*
* Return: bool
*/
bool mlme_cm_subst_roam_start_event(void *ctx, uint16_t event,
uint16_t event_data_len,
void *event_data);
bool cm_subst_roam_start_event(void *ctx, uint16_t event, uint16_t data_len,
void *data);
/**
* mlme_cm_subst_roam_sync_entry() - Entry API for roam sync sub-state for
* cm_subst_roam_sync_entry() - Entry API for roam sync sub-state for
* connection mgr
* @ctx: connection manager ctx
*
@ -189,10 +196,10 @@ bool mlme_cm_subst_roam_start_event(void *ctx, uint16_t event,
*
* Return: void
*/
void mlme_cm_subst_roam_sync_entry(void *ctx);
void cm_subst_roam_sync_entry(void *ctx);
/**
* mlme_cm_subst_roam_sync_exit() - Exit API for roam sync sub-state for
* cm_subst_roam_sync_exit() - Exit API for roam sync sub-state for
* connection mgr
* @ctx: connection manager ctx
*
@ -200,20 +207,22 @@ void mlme_cm_subst_roam_sync_entry(void *ctx);
*
* Return: void
*/
void mlme_cm_subst_roam_sync_exit(void *ctx);
void cm_subst_roam_sync_exit(void *ctx);
/**
* mlme_cm_subst_roam_sync_event() - Roam sync sub-state event handler for
* cm_subst_roam_sync_event() - Roam sync sub-state event handler for
* connection mgr
* @ctx: connection manager ctx
* @event: event to handle
* @data_len: event data len
* @data:event data
*
* API to handle events in roam sync sub-state
*
* Return: bool
*/
bool mlme_cm_subst_roam_sync_event(void *ctx, uint16_t event,
uint16_t event_data_len,
void *event_data);
bool cm_subst_roam_sync_event(void *ctx, uint16_t event, uint16_t data_len,
void *data);
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
#endif /* __WLAN_CM_ROAM_SM_H__ */

View file

@ -22,7 +22,7 @@
#include "wlan_cm_sm.h"
#include "wlan_cm_roam_sm.h"
void mlme_cm_set_state(struct cnx_mgr *cm_ctx, enum wlan_cm_sm_state state)
void cm_set_state(struct cnx_mgr *cm_ctx, enum wlan_cm_sm_state state)
{
if (state < WLAN_CM_S_MAX)
cm_ctx->sm.cm_state = state;
@ -30,8 +30,7 @@ void mlme_cm_set_state(struct cnx_mgr *cm_ctx, enum wlan_cm_sm_state state)
mlme_err("mlme state (%d) is invalid", state);
}
void mlme_cm_set_substate(struct cnx_mgr *cm_ctx,
enum wlan_cm_sm_state substate)
void cm_set_substate(struct cnx_mgr *cm_ctx, enum wlan_cm_sm_state substate)
{
if ((substate > WLAN_CM_S_MAX) && (substate < WLAN_CM_SS_MAX))
cm_ctx->sm.cm_substate = substate;
@ -39,66 +38,65 @@ void mlme_cm_set_substate(struct cnx_mgr *cm_ctx,
mlme_err(" mlme sub state (%d) is invalid", substate);
}
void mlme_cm_sm_state_update(struct cnx_mgr *cm_ctx,
enum wlan_cm_sm_state state,
enum wlan_cm_sm_state substate)
void cm_sm_state_update(struct cnx_mgr *cm_ctx,
enum wlan_cm_sm_state state,
enum wlan_cm_sm_state substate)
{
if (!cm_ctx) {
mlme_err("cm_ctx is NULL");
return;
}
mlme_cm_set_state(cm_ctx, state);
mlme_cm_set_substate(cm_ctx, substate);
cm_set_state(cm_ctx, state);
cm_set_substate(cm_ctx, substate);
}
/**
* mlme_cm_state_init_entry() - Entry API for init state for connection mgr
* cm_state_init_entry() - Entry API for init state for connection mgr
* @ctx: connection manager ctx
*
* API to perform operations on moving to init state
*
* Return: void
*/
static void mlme_cm_state_init_entry(void *ctx)
static void cm_state_init_entry(void *ctx)
{
struct cnx_mgr *cm_ctx = ctx;
mlme_cm_sm_state_update(cm_ctx, WLAN_CM_S_INIT, WLAN_CM_SS_IDLE);
cm_sm_state_update(cm_ctx, WLAN_CM_S_INIT, WLAN_CM_SS_IDLE);
}
/**
* mlme_cm_state_init_exit() - Exit API for init state for connection mgr
* cm_state_init_exit() - Exit API for init state for connection mgr
* @ctx: connection manager ctx
*
* API to perform operations on exiting from init state
*
* Return: void
*/
static void mlme_cm_state_init_exit(void *ctx)
static void cm_state_init_exit(void *ctx)
{
}
/**
* mlme_cm_state_init_event() - Init State event handler for connection mgr
* cm_state_init_event() - Init State event handler for connection mgr
* @ctx: connection manager ctx
*
* API to handle events in INIT state
*
* Return: bool
*/
static bool mlme_cm_state_init_event(void *ctx, uint16_t event,
uint16_t data_len, void *data)
static bool cm_state_init_event(void *ctx, uint16_t event,
uint16_t data_len, void *data)
{
struct cnx_mgr *cm_ctx = ctx;
bool status;
switch (event) {
case WLAN_CM_SM_EV_CONNECT_REQ:
mlme_cm_sm_transition_to(cm_ctx, WLAN_CM_S_CONNECTING);
mlme_cm_sm_deliver_event(cm_ctx,
WLAN_CM_SM_EV_CONNECT_START,
data_len, data);
cm_sm_transition_to(cm_ctx, WLAN_CM_S_CONNECTING);
cm_sm_deliver_event(cm_ctx, WLAN_CM_SM_EV_CONNECT_START,
data_len, data);
status = true;
break;
case WLAN_CM_SM_EV_CONNECT_FAILURE:
@ -118,7 +116,7 @@ static bool mlme_cm_state_init_event(void *ctx, uint16_t event,
}
/**
* mlme_cm_state_connecting_entry() - Entry API for connecting state for
* cm_state_connecting_entry() - Entry API for connecting state for
* connection mgr
* @ctx: connection manager ctx
*
@ -126,15 +124,15 @@ static bool mlme_cm_state_init_event(void *ctx, uint16_t event,
*
* Return: void
*/
static void mlme_cm_state_connecting_entry(void *ctx)
static void cm_state_connecting_entry(void *ctx)
{
struct cnx_mgr *cm_ctx = ctx;
mlme_cm_sm_state_update(cm_ctx, WLAN_CM_S_CONNECTING, WLAN_CM_SS_IDLE);
cm_sm_state_update(cm_ctx, WLAN_CM_S_CONNECTING, WLAN_CM_SS_IDLE);
}
/**
* mlme_cm_state_connecting_exit() - Exit API for connecting state for
* cm_state_connecting_exit() - Exit API for connecting state for
* connection mgr
* @ctx: connection manager ctx
*
@ -142,12 +140,12 @@ static void mlme_cm_state_connecting_entry(void *ctx)
*
* Return: void
*/
static void mlme_cm_state_connecting_exit(void *ctx)
static void cm_state_connecting_exit(void *ctx)
{
}
/**
* mlme_cm_state_connecting_event() - Connecting State event handler for
* cm_state_connecting_event() - Connecting State event handler for
* connection mgr
* @ctx: connection manager ctx
*
@ -155,16 +153,16 @@ static void mlme_cm_state_connecting_exit(void *ctx)
*
* Return: bool
*/
static bool mlme_cm_state_connecting_event(void *ctx, uint16_t event,
uint16_t data_len, void *data)
static bool cm_state_connecting_event(void *ctx, uint16_t event,
uint16_t data_len, void *data)
{
struct cnx_mgr *cm_ctx = ctx;
bool status;
switch (event) {
case WLAN_CM_SM_EV_CONNECT_START:
mlme_cm_sm_transition_to(cm_ctx, WLAN_CM_SS_JOIN_PENDING);
mlme_cm_sm_deliver_event(cm_ctx, event, data_len, data);
cm_sm_transition_to(cm_ctx, WLAN_CM_SS_JOIN_PENDING);
cm_sm_deliver_event(cm_ctx, event, data_len, data);
status = true;
break;
default:
@ -176,7 +174,7 @@ static bool mlme_cm_state_connecting_event(void *ctx, uint16_t event,
}
/**
* mlme_cm_state_connected_entry() - Entry API for connected state for
* cm_state_connected_entry() - Entry API for connected state for
* connection mgr
* @ctx: connection manager ctx
*
@ -184,15 +182,15 @@ static bool mlme_cm_state_connecting_event(void *ctx, uint16_t event,
*
* Return: void
*/
static void mlme_cm_state_connected_entry(void *ctx)
static void cm_state_connected_entry(void *ctx)
{
struct cnx_mgr *cm_ctx = ctx;
mlme_cm_sm_state_update(cm_ctx, WLAN_CM_S_CONNECTED, WLAN_CM_SS_IDLE);
cm_sm_state_update(cm_ctx, WLAN_CM_S_CONNECTED, WLAN_CM_SS_IDLE);
}
/**
* mlme_cm_state_connected_exit() - Exit API for connected state for
* cm_state_connected_exit() - Exit API for connected state for
* connection mgr
* @ctx: connection manager ctx
*
@ -200,12 +198,12 @@ static void mlme_cm_state_connected_entry(void *ctx)
*
* Return: void
*/
static void mlme_cm_state_connected_exit(void *ctx)
static void cm_state_connected_exit(void *ctx)
{
}
/**
* mlme_cm_state_connected_event() - Connected State event handler for
* cm_state_connected_event() - Connected State event handler for
* connection mgr
* @ctx: connection manager ctx
*
@ -213,8 +211,8 @@ static void mlme_cm_state_connected_exit(void *ctx)
*
* Return: bool
*/
static bool mlme_cm_state_connected_event(void *ctx, uint16_t event,
uint16_t data_len, void *data)
static bool cm_state_connected_event(void *ctx, uint16_t event,
uint16_t data_len, void *data)
{
struct cnx_mgr *cm_ctx = ctx;
bool status;
@ -225,10 +223,9 @@ static bool mlme_cm_state_connected_event(void *ctx, uint16_t event,
status = true;
break;
case WLAN_CM_SM_EV_DISCONNECT_REQ:
mlme_cm_sm_transition_to(cm_ctx, WLAN_CM_S_DISCONNECTING);
mlme_cm_sm_deliver_event(cm_ctx,
WLAN_CM_SM_EV_DISCONNECT_START,
data_len, data);
cm_sm_transition_to(cm_ctx, WLAN_CM_S_DISCONNECTING);
cm_sm_deliver_event(cm_ctx, WLAN_CM_SM_EV_DISCONNECT_START,
data_len, data);
status = true;
break;
default:
@ -240,7 +237,7 @@ static bool mlme_cm_state_connected_event(void *ctx, uint16_t event,
}
/**
* mlme_cm_state_disconnecting_entry() - Entry API for disconnecting state for
* cm_state_disconnecting_entry() - Entry API for disconnecting state for
* connection mgr
* @ctx: connection manager ctx
*
@ -248,16 +245,15 @@ static bool mlme_cm_state_connected_event(void *ctx, uint16_t event,
*
* Return: void
*/
static void mlme_cm_state_disconnecting_entry(void *ctx)
static void cm_state_disconnecting_entry(void *ctx)
{
struct cnx_mgr *cm_ctx = ctx;
mlme_cm_sm_state_update(cm_ctx, WLAN_CM_S_DISCONNECTING,
WLAN_CM_SS_IDLE);
cm_sm_state_update(cm_ctx, WLAN_CM_S_DISCONNECTING, WLAN_CM_SS_IDLE);
}
/**
* mlme_cm_state_disconnecting_exit() - Exit API for disconnecting state for
* cm_state_disconnecting_exit() - Exit API for disconnecting state for
* connection mgr
* @ctx: connection manager ctx
*
@ -265,12 +261,12 @@ static void mlme_cm_state_disconnecting_entry(void *ctx)
*
* Return: void
*/
static void mlme_cm_state_disconnecting_exit(void *ctx)
static void cm_state_disconnecting_exit(void *ctx)
{
}
/**
* mlme_cm_state_connected_event() - Disconnecting State event handler for
* cm_state_connected_event() - Disconnecting State event handler for
* connection mgr
* @ctx: connection manager ctx
*
@ -278,8 +274,8 @@ static void mlme_cm_state_disconnecting_exit(void *ctx)
*
* Return: bool
*/
static bool mlme_cm_state_disconnecting_event(void *ctx, uint16_t event,
uint16_t data_len, void *data)
static bool cm_state_disconnecting_event(void *ctx, uint16_t event,
uint16_t data_len, void *data)
{
struct cnx_mgr *cm_ctx = ctx;
bool status;
@ -294,8 +290,8 @@ static bool mlme_cm_state_disconnecting_event(void *ctx, uint16_t event,
status = true;
break;
case WLAN_CM_SM_EV_DISCONNECT_DONE:
mlme_cm_sm_transition_to(cm_ctx, WLAN_CM_S_INIT);
mlme_cm_sm_deliver_event(cm_ctx, event, data_len, data);
cm_sm_transition_to(cm_ctx, WLAN_CM_S_INIT);
cm_sm_deliver_event(cm_ctx, event, data_len, data);
status = true;
break;
default:
@ -307,7 +303,7 @@ static bool mlme_cm_state_disconnecting_event(void *ctx, uint16_t event,
}
/**
* mlme_cm_subst_join_pending_entry() - Entry API for join pending sub-state for
* cm_subst_join_pending_entry() - Entry API for join pending sub-state for
* connection mgr
* @ctx: connection manager ctx
*
@ -315,18 +311,18 @@ static bool mlme_cm_state_disconnecting_event(void *ctx, uint16_t event,
*
* Return: void
*/
static void mlme_cm_subst_join_pending_entry(void *ctx)
static void cm_subst_join_pending_entry(void *ctx)
{
struct cnx_mgr *cm_ctx = ctx;
if (mlme_cm_get_state(cm_ctx) != WLAN_CM_S_CONNECTING)
if (cm_get_state(cm_ctx) != WLAN_CM_S_CONNECTING)
QDF_BUG(0);
mlme_cm_set_substate(cm_ctx, WLAN_CM_SS_JOIN_PENDING);
cm_set_substate(cm_ctx, WLAN_CM_SS_JOIN_PENDING);
}
/**
* mlme_cm_subst_join_pending_exit() - Exit API for join pending sub-state for
* cm_subst_join_pending_exit() - Exit API for join pending sub-state for
* connection mgr
* @ctx: connection manager ctx
*
@ -334,12 +330,12 @@ static void mlme_cm_subst_join_pending_entry(void *ctx)
*
* Return: void
*/
static void mlme_cm_subst_join_pending_exit(void *ctx)
static void cm_subst_join_pending_exit(void *ctx)
{
}
/**
* mlme_cm_subst_join_pending_event() - Join pending sub-state event handler for
* cm_subst_join_pending_event() - Join pending sub-state event handler for
* connection mgr
* @ctx: connection manager ctx
*
@ -347,8 +343,8 @@ static void mlme_cm_subst_join_pending_exit(void *ctx)
*
* Return: bool
*/
static bool mlme_cm_subst_join_pending_event(void *ctx, uint16_t event,
uint16_t data_len, void *data)
static bool cm_subst_join_pending_event(void *ctx, uint16_t event,
uint16_t data_len, void *data)
{
struct cnx_mgr *cm_ctx = ctx;
bool status;
@ -360,13 +356,13 @@ static bool mlme_cm_subst_join_pending_event(void *ctx, uint16_t event,
status = true;
break;
case WLAN_CM_SM_EV_CONNECT_ACTIVE:
mlme_cm_sm_transition_to(cm_ctx, WLAN_CM_SS_JOIN_ACTIVE);
mlme_cm_sm_deliver_event(cm_ctx, event, data_len, data);
cm_sm_transition_to(cm_ctx, WLAN_CM_SS_JOIN_ACTIVE);
cm_sm_deliver_event(cm_ctx, event, data_len, data);
status = true;
break;
case WLAN_CM_SM_EV_SCAN:
mlme_cm_sm_transition_to(cm_ctx, WLAN_CM_SS_SCAN);
mlme_cm_sm_deliver_event(cm_ctx, event, data_len, data);
cm_sm_transition_to(cm_ctx, WLAN_CM_SS_SCAN);
cm_sm_deliver_event(cm_ctx, event, data_len, data);
status = true;
break;
case WLAN_CM_SM_EV_SCAN_FAILURE:
@ -377,8 +373,8 @@ static bool mlme_cm_subst_join_pending_event(void *ctx, uint16_t event,
status = true;
break;
case WLAN_CM_SM_EV_CONNECT_FAILURE:
mlme_cm_sm_transition_to(cm_ctx, WLAN_CM_S_INIT);
mlme_cm_sm_deliver_event(cm_ctx, event, data_len, data);
cm_sm_transition_to(cm_ctx, WLAN_CM_S_INIT);
cm_sm_deliver_event(cm_ctx, event, data_len, data);
status = true;
break;
default:
@ -390,7 +386,7 @@ static bool mlme_cm_subst_join_pending_event(void *ctx, uint16_t event,
}
/**
* mlme_cm_subst_scan_entry() - Entry API for scan sub-state for
* cm_subst_scan_entry() - Entry API for scan sub-state for
* connection mgr
* @ctx: connection manager ctx
*
@ -398,18 +394,18 @@ static bool mlme_cm_subst_join_pending_event(void *ctx, uint16_t event,
*
* Return: void
*/
static void mlme_cm_subst_scan_entry(void *ctx)
static void cm_subst_scan_entry(void *ctx)
{
struct cnx_mgr *cm_ctx = ctx;
if (mlme_cm_get_state(cm_ctx) != WLAN_CM_S_CONNECTING)
if (cm_get_state(cm_ctx) != WLAN_CM_S_CONNECTING)
QDF_BUG(0);
mlme_cm_set_substate(cm_ctx, WLAN_CM_SS_SCAN);
cm_set_substate(cm_ctx, WLAN_CM_SS_SCAN);
}
/**
* mlme_cm_subst_scan_exit() - Exit API for scan sub-state for
* cm_subst_scan_exit() - Exit API for scan sub-state for
* connection mgr
* @ctx: connection manager ctx
*
@ -417,12 +413,12 @@ static void mlme_cm_subst_scan_entry(void *ctx)
*
* Return: void
*/
static void mlme_cm_subst_scan_exit(void *ctx)
static void cm_subst_scan_exit(void *ctx)
{
}
/**
* mlme_cm_subst_scan_event() - Scan sub-state event handler for
* cm_subst_scan_event() - Scan sub-state event handler for
* connection mgr
* @ctx: connection manager ctx
*
@ -430,8 +426,8 @@ static void mlme_cm_subst_scan_exit(void *ctx)
*
* Return: bool
*/
static bool mlme_cm_subst_scan_event(void *ctx, uint16_t event,
uint16_t data_len, void *data)
static bool cm_subst_scan_event(void *ctx, uint16_t event,
uint16_t data_len, void *data)
{
struct cnx_mgr *cm_ctx = ctx;
bool status;
@ -443,8 +439,8 @@ static bool mlme_cm_subst_scan_event(void *ctx, uint16_t event,
break;
case WLAN_CM_SM_EV_SCAN_SUCCESS:
case WLAN_CM_SM_EV_SCAN_FAILURE:
mlme_cm_sm_transition_to(cm_ctx, WLAN_CM_SS_JOIN_PENDING);
mlme_cm_sm_deliver_event(cm_ctx, event, data_len, data);
cm_sm_transition_to(cm_ctx, WLAN_CM_SS_JOIN_PENDING);
cm_sm_deliver_event(cm_ctx, event, data_len, data);
status = true;
break;
default:
@ -456,7 +452,7 @@ static bool mlme_cm_subst_scan_event(void *ctx, uint16_t event,
}
/**
* mlme_cm_subst_join_active_entry() - Entry API for join active sub-state for
* cm_subst_join_active_entry() - Entry API for join active sub-state for
* connection mgr
* @ctx: connection manager ctx
*
@ -464,18 +460,18 @@ static bool mlme_cm_subst_scan_event(void *ctx, uint16_t event,
*
* Return: void
*/
static void mlme_cm_subst_join_active_entry(void *ctx)
static void cm_subst_join_active_entry(void *ctx)
{
struct cnx_mgr *cm_ctx = ctx;
if (mlme_cm_get_state(cm_ctx) != WLAN_CM_S_CONNECTING)
if (cm_get_state(cm_ctx) != WLAN_CM_S_CONNECTING)
QDF_BUG(0);
mlme_cm_set_substate(cm_ctx, WLAN_CM_SS_JOIN_ACTIVE);
cm_set_substate(cm_ctx, WLAN_CM_SS_JOIN_ACTIVE);
}
/**
* mlme_cm_subst_join_active_exit() - Exit API for join active sub-state for
* cm_subst_join_active_exit() - Exit API for join active sub-state for
* connection mgr
* @ctx: connection manager ctx
*
@ -483,12 +479,12 @@ static void mlme_cm_subst_join_active_entry(void *ctx)
*
* Return: void
*/
static void mlme_cm_subst_join_active_exit(void *ctx)
static void cm_subst_join_active_exit(void *ctx)
{
}
/**
* mlme_cm_subst_join_active_event() - Join active sub-state event handler for
* cm_subst_join_active_event() - Join active sub-state event handler for
* connection mgr
* @ctx: connection manager ctx
*
@ -496,8 +492,8 @@ static void mlme_cm_subst_join_active_exit(void *ctx)
*
* Return: bool
*/
static bool mlme_cm_subst_join_active_event(void *ctx, uint16_t event,
uint16_t data_len, void *data)
static bool cm_subst_join_active_event(void *ctx, uint16_t event,
uint16_t data_len, void *data)
{
struct cnx_mgr *cm_ctx = ctx;
bool status;
@ -508,8 +504,8 @@ static bool mlme_cm_subst_join_active_event(void *ctx, uint16_t event,
status = true;
break;
case WLAN_CM_SM_EV_CONNECT_SUCCESS:
mlme_cm_sm_transition_to(cm_ctx, WLAN_CM_S_CONNECTED);
mlme_cm_sm_deliver_event(cm_ctx, event, data_len, data);
cm_sm_transition_to(cm_ctx, WLAN_CM_S_CONNECTED);
cm_sm_deliver_event(cm_ctx, event, data_len, data);
status = true;
break;
case WLAN_CM_SM_EV_CONNECT_GET_NEXT_CANDIDATE:
@ -517,8 +513,8 @@ static bool mlme_cm_subst_join_active_event(void *ctx, uint16_t event,
status = true;
break;
case WLAN_CM_SM_EV_CONNECT_FAILURE:
mlme_cm_sm_transition_to(cm_ctx, WLAN_CM_S_INIT);
mlme_cm_sm_deliver_event(cm_ctx, event, data_len, data);
cm_sm_transition_to(cm_ctx, WLAN_CM_S_INIT);
cm_sm_deliver_event(cm_ctx, event, data_len, data);
status = true;
break;
default:
@ -536,9 +532,9 @@ struct wlan_sm_state_info cm_sm_info[] = {
(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
true,
"INIT",
mlme_cm_state_init_entry,
mlme_cm_state_init_exit,
mlme_cm_state_init_event
cm_state_init_entry,
cm_state_init_exit,
cm_state_init_event
},
{
(uint8_t)WLAN_CM_S_CONNECTING,
@ -546,9 +542,9 @@ struct wlan_sm_state_info cm_sm_info[] = {
(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
true,
"CONNECTING",
mlme_cm_state_connecting_entry,
mlme_cm_state_connecting_exit,
mlme_cm_state_connecting_event
cm_state_connecting_entry,
cm_state_connecting_exit,
cm_state_connecting_event
},
{
(uint8_t)WLAN_CM_S_CONNECTED,
@ -556,9 +552,9 @@ struct wlan_sm_state_info cm_sm_info[] = {
(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
true,
"CONNECTED",
mlme_cm_state_connected_entry,
mlme_cm_state_connected_exit,
mlme_cm_state_connected_event
cm_state_connected_entry,
cm_state_connected_exit,
cm_state_connected_event
},
{
(uint8_t)WLAN_CM_S_DISCONNECTING,
@ -566,9 +562,9 @@ struct wlan_sm_state_info cm_sm_info[] = {
(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
true,
"DISCONNECTING",
mlme_cm_state_disconnecting_entry,
mlme_cm_state_disconnecting_exit,
mlme_cm_state_disconnecting_event
cm_state_disconnecting_entry,
cm_state_disconnecting_exit,
cm_state_disconnecting_event
},
{
(uint8_t)WLAN_CM_S_ROAMING,
@ -576,9 +572,9 @@ struct wlan_sm_state_info cm_sm_info[] = {
(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
true,
"ROAMING",
mlme_cm_state_roaming_entry,
mlme_cm_state_roaming_exit,
mlme_cm_state_roaming_event
cm_state_roaming_entry,
cm_state_roaming_exit,
cm_state_roaming_event
},
{
(uint8_t)WLAN_CM_S_MAX,
@ -606,9 +602,9 @@ struct wlan_sm_state_info cm_sm_info[] = {
(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
false,
"JOIN_PENDING",
mlme_cm_subst_join_pending_entry,
mlme_cm_subst_join_pending_exit,
mlme_cm_subst_join_pending_event
cm_subst_join_pending_entry,
cm_subst_join_pending_exit,
cm_subst_join_pending_event
},
{
(uint8_t)WLAN_CM_SS_SCAN,
@ -616,9 +612,9 @@ struct wlan_sm_state_info cm_sm_info[] = {
(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
false,
"SCAN",
mlme_cm_subst_scan_entry,
mlme_cm_subst_scan_exit,
mlme_cm_subst_scan_event
cm_subst_scan_entry,
cm_subst_scan_exit,
cm_subst_scan_event
},
{
(uint8_t)WLAN_CM_SS_JOIN_ACTIVE,
@ -626,9 +622,9 @@ struct wlan_sm_state_info cm_sm_info[] = {
(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
false,
"JOIN_ACTIVE",
mlme_cm_subst_join_active_entry,
mlme_cm_subst_join_active_exit,
mlme_cm_subst_join_active_event
cm_subst_join_active_entry,
cm_subst_join_active_exit,
cm_subst_join_active_event
},
#ifdef WLAN_FEATURE_HOST_ROAM
{
@ -637,9 +633,9 @@ struct wlan_sm_state_info cm_sm_info[] = {
(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
false,
"PREAUTH",
mlme_cm_subst_preauth_entry,
mlme_cm_subst_preauth_exit,
mlme_cm_subst_preauth_event
cm_subst_preauth_entry,
cm_subst_preauth_exit,
cm_subst_preauth_event
},
{
(uint8_t)WLAN_CM_SS_REASSOC,
@ -647,9 +643,9 @@ struct wlan_sm_state_info cm_sm_info[] = {
(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
false,
"REASSOC",
mlme_cm_subst_reassoc_entry,
mlme_cm_subst_reassoc_exit,
mlme_cm_subst_reassoc_event
cm_subst_reassoc_entry,
cm_subst_reassoc_exit,
cm_subst_reassoc_event
},
#endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
@ -659,9 +655,9 @@ struct wlan_sm_state_info cm_sm_info[] = {
(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
false,
"ROAM_START",
mlme_cm_subst_roam_start_entry,
mlme_cm_subst_roam_start_exit,
mlme_cm_subst_roam_start_event
cm_subst_roam_start_entry,
cm_subst_roam_start_exit,
cm_subst_roam_start_event
},
{
(uint8_t)WLAN_CM_SS_ROAM_SYNC,
@ -669,9 +665,9 @@ struct wlan_sm_state_info cm_sm_info[] = {
(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
false,
"ROAM_SYNC",
mlme_cm_subst_roam_sync_entry,
mlme_cm_subst_roam_sync_exit,
mlme_cm_subst_roam_sync_event
cm_subst_roam_sync_entry,
cm_subst_roam_sync_exit,
cm_subst_roam_sync_event
},
#endif
{
@ -713,7 +709,7 @@ static const char *cm_sm_event_names[] = {
"EV_ROAM_COMPLETE",
};
enum wlan_cm_sm_state mlme_cm_get_state(struct cnx_mgr *cm_ctx)
enum wlan_cm_sm_state cm_get_state(struct cnx_mgr *cm_ctx)
{
enum QDF_OPMODE op_mode;
@ -728,7 +724,7 @@ enum wlan_cm_sm_state mlme_cm_get_state(struct cnx_mgr *cm_ctx)
return cm_ctx->sm.cm_state;
}
enum wlan_cm_sm_state mlme_cm_get_sub_state(struct cnx_mgr *cm_ctx)
enum wlan_cm_sm_state cm_get_sub_state(struct cnx_mgr *cm_ctx)
{
enum QDF_OPMODE op_mode;
@ -743,35 +739,35 @@ enum wlan_cm_sm_state mlme_cm_get_sub_state(struct cnx_mgr *cm_ctx)
return cm_ctx->sm.cm_substate;
}
static void mlme_cm_sm_print_state_event(struct cnx_mgr *cm_ctx,
enum wlan_cm_sm_evt event)
static void cm_sm_print_state_event(struct cnx_mgr *cm_ctx,
enum wlan_cm_sm_evt event)
{
enum wlan_cm_sm_state state;
enum wlan_cm_sm_state substate;
state = mlme_cm_get_state(cm_ctx);
substate = mlme_cm_get_sub_state(cm_ctx);
state = cm_get_state(cm_ctx);
substate = cm_get_sub_state(cm_ctx);
mlme_nofl_debug("[%s]%s - %s, %s", cm_ctx->sm.sm_hdl->name,
cm_sm_info[state].name, cm_sm_info[substate].name,
cm_sm_event_names[event]);
}
static void mlme_cm_sm_print_state(struct cnx_mgr *cm_ctx)
static void cm_sm_print_state(struct cnx_mgr *cm_ctx)
{
enum wlan_cm_sm_state state;
enum wlan_cm_sm_state substate;
state = mlme_cm_get_state(cm_ctx);
substate = mlme_cm_get_sub_state(cm_ctx);
state = cm_get_state(cm_ctx);
substate = cm_get_sub_state(cm_ctx);
mlme_nofl_debug("[%s]%s - %s", cm_ctx->sm.sm_hdl->name,
cm_sm_info[state].name, cm_sm_info[substate].name);
}
QDF_STATUS wlan_mlme_cm_sm_deliver_evt(struct wlan_objmgr_vdev *vdev,
enum wlan_cm_sm_evt event,
uint16_t data_len, void *data)
QDF_STATUS wlan_cm_sm_deliver_evt(struct wlan_objmgr_vdev *vdev,
enum wlan_cm_sm_evt event,
uint16_t data_len, void *data)
{
struct vdev_mlme_obj *vdev_mlme;
QDF_STATUS status;
@ -791,26 +787,26 @@ QDF_STATUS wlan_mlme_cm_sm_deliver_evt(struct wlan_objmgr_vdev *vdev,
return QDF_STATUS_E_FAILURE;
}
cm_ctx = vdev_mlme->cnx_mgr_ctx;
mlme_cm_lock_acquire(cm_ctx);
cm_lock_acquire(cm_ctx);
/* store entry state and sub state for prints */
state_entry = mlme_cm_get_state(cm_ctx);
substate_entry = mlme_cm_get_sub_state(cm_ctx);
mlme_cm_sm_print_state_event(cm_ctx, event);
state_entry = cm_get_state(cm_ctx);
substate_entry = cm_get_sub_state(cm_ctx);
cm_sm_print_state_event(cm_ctx, event);
status = mlme_cm_sm_deliver_event(cm_ctx, event, data_len, data);
status = cm_sm_deliver_event(cm_ctx, event, data_len, data);
/* Take exit state, exit substate for prints */
state_exit = mlme_cm_get_state(cm_ctx);
substate_exit = mlme_cm_get_sub_state(cm_ctx);
state_exit = cm_get_state(cm_ctx);
substate_exit = cm_get_sub_state(cm_ctx);
/* If no state and substate change, don't print */
if (!((state_entry == state_exit) && (substate_entry == substate_exit)))
mlme_cm_sm_print_state(cm_ctx);
mlme_cm_lock_release(cm_ctx);
cm_sm_print_state(cm_ctx);
cm_lock_release(cm_ctx);
return status;
}
QDF_STATUS mlme_cm_sm_create(struct cnx_mgr *cm_ctx)
QDF_STATUS cm_sm_create(struct cnx_mgr *cm_ctx)
{
struct wlan_sm *sm;
uint8_t name[WLAN_SM_ENGINE_MAX_NAME];
@ -829,14 +825,14 @@ QDF_STATUS mlme_cm_sm_create(struct cnx_mgr *cm_ctx)
}
cm_ctx->sm.sm_hdl = sm;
mlme_cm_lock_create(cm_ctx);
cm_lock_create(cm_ctx);
return QDF_STATUS_SUCCESS;
}
QDF_STATUS mlme_cm_sm_destroy(struct cnx_mgr *cm_ctx)
QDF_STATUS cm_sm_destroy(struct cnx_mgr *cm_ctx)
{
mlme_cm_lock_destroy(cm_ctx);
cm_lock_destroy(cm_ctx);
wlan_sm_delete(cm_ctx->sm.sm_hdl);
return QDF_STATUS_SUCCESS;

View file

@ -27,7 +27,7 @@
#include <wlan_sm_engine.h>
/**
* mlme_cm_sm_create() - Invoke SM creation for connection manager
* cm_sm_create() - Invoke SM creation for connection manager
* @cm_ctx: connection manager ctx
*
* API allocates CM MLME SM and initializes SM lock
@ -35,10 +35,10 @@
* Return: SUCCESS on successful allocation
* FAILURE, if registration fails
*/
QDF_STATUS mlme_cm_sm_create(struct cnx_mgr *cm_ctx);
QDF_STATUS cm_sm_create(struct cnx_mgr *cm_ctx);
/**
* mlme_cm_sm_destroy() - Invoke SM deletion for connection manager
* cm_sm_destroy() - Invoke SM deletion for connection manager
* @cm_ctx: connection manager ctx
*
* API destroys CM MLME SM and SM lock
@ -46,10 +46,10 @@ QDF_STATUS mlme_cm_sm_create(struct cnx_mgr *cm_ctx);
* Return: SUCCESS on successful deletion
* FAILURE, if deletion fails
*/
QDF_STATUS mlme_cm_sm_destroy(struct cnx_mgr *cm_ctx);
QDF_STATUS cm_sm_destroy(struct cnx_mgr *cm_ctx);
/**
* mlme_cm_sm_history_print() - Prints SM history
* cm_sm_history_print() - Prints SM history
* @cm_ctx: connection manager ctx
*
* API to print CM SM history
@ -57,19 +57,19 @@ QDF_STATUS mlme_cm_sm_destroy(struct cnx_mgr *cm_ctx);
* Return: void
*/
#ifdef SM_ENG_HIST_ENABLE
static inline void mlme_cm_sm_history_print(struct cnx_mgr *cm_ctx)
static inline void cm_sm_history_print(struct cnx_mgr *cm_ctx)
{
return wlan_sm_print_history(cm_ctx->sm.sm_hdl);
}
#else
static inline void mlme_cm_sm_history_print(struct cnx_mgr *cm_ctx)
static inline void cm_sm_history_print(struct cnx_mgr *cm_ctx)
{
}
#endif
#ifdef WLAN_CM_USE_SPINLOCK
/**
* mlme_cm_lock_create - Create CM SM mutex/spinlock
* cm_lock_create - Create CM SM mutex/spinlock
* @cm_ctx: connection manager ctx
*
* Creates CM SM mutex/spinlock
@ -77,13 +77,13 @@ static inline void mlme_cm_sm_history_print(struct cnx_mgr *cm_ctx)
* Return: void
*/
static inline void
mlme_cm_lock_create(struct cnx_mgr *cm_ctx)
cm_lock_create(struct cnx_mgr *cm_ctx)
{
qdf_spinlock_create(&cm_ctx->sm.cm_sm_lock);
}
/**
* mlme_cm_lock_destroy - Destroy CM SM mutex/spinlock
* cm_lock_destroy - Destroy CM SM mutex/spinlock
* @cm_ctx: connection manager ctx
*
* Destroy CM SM mutex/spinlock
@ -91,62 +91,62 @@ mlme_cm_lock_create(struct cnx_mgr *cm_ctx)
* Return: void
*/
static inline void
mlme_cm_lock_destroy(struct cnx_mgr *cm_ctx)
cm_lock_destroy(struct cnx_mgr *cm_ctx)
{
qdf_spinlock_destroy(&cm_ctx->sm.cm_sm_lock);
}
/**
* mlme_cm_lock_acquire - acquire CM SM mutex/spinlock
* cm_lock_acquire - acquire CM SM mutex/spinlock
* @cm_ctx: connection manager ctx
*
* acquire CM SM mutex/spinlock
*
* return: void
*/
static inline void mlme_cm_lock_acquire(struct cnx_mgr *cm_ctx)
static inline void cm_lock_acquire(struct cnx_mgr *cm_ctx)
{
qdf_spinlock_acquire(&cm_ctx->sm.cm_sm_lock);
}
/**
* mlme_cm_lock_release - release CM SM mutex/spinlock
* cm_lock_release - release CM SM mutex/spinlock
* @cm_ctx: connection manager ctx
*
* release CM SM mutex/spinlock
*
* return: void
*/
static inline void mlme_cm_lock_release(struct cnx_mgr *cm_ctx)
static inline void cm_lock_release(struct cnx_mgr *cm_ctx)
{
qdf_spinlock_release(&cm_ctx->sm.cm_sm_lock);
}
#else
static inline void
mlme_cm_lock_create(struct cnx_mgr *cm_ctx)
cm_lock_create(struct cnx_mgr *cm_ctx)
{
qdf_mutex_create(&cm_ctx->sm.cm_sm_lock);
}
static inline void
mlme_cm_lock_destroy(struct cnx_mgr *cm_ctx)
cm_lock_destroy(struct cnx_mgr *cm_ctx)
{
qdf_mutex_destroy(&cm_ctx->sm.cm_sm_lock);
}
static inline void mlme_cm_lock_acquire(struct cnx_mgr *cm_ctx)
static inline void cm_lock_acquire(struct cnx_mgr *cm_ctx)
{
qdf_mutex_acquire(&cm_ctx->sm.cm_sm_lock);
}
static inline void mlme_cm_lock_release(struct cnx_mgr *cm_ctx)
static inline void cm_lock_release(struct cnx_mgr *cm_ctx)
{
qdf_mutex_release(&cm_ctx->sm.cm_sm_lock);
}
#endif /* WLAN_CM_USE_SPINLOCK */
/**
* mlme_cm_sm_transition_to() - invokes state transition
* cm_sm_transition_to() - invokes state transition
* @cm_ctx: connection manager ctx
* @state: new cm state
*
@ -154,34 +154,34 @@ static inline void mlme_cm_lock_release(struct cnx_mgr *cm_ctx)
*
* Return: void
*/
static inline void mlme_cm_sm_transition_to(struct cnx_mgr *cm_ctx,
enum wlan_cm_sm_state state)
static inline void cm_sm_transition_to(struct cnx_mgr *cm_ctx,
enum wlan_cm_sm_state state)
{
wlan_sm_transition_to(cm_ctx->sm.sm_hdl, state);
}
/**
* mlme_cm_get_state() - get mlme state
* cm_get_state() - get mlme state
* @cm_ctx: connection manager SM ctx
*
* API to get cm state
*
* Return: state of cm
*/
enum wlan_cm_sm_state mlme_cm_get_state(struct cnx_mgr *cm_ctx);
enum wlan_cm_sm_state cm_get_state(struct cnx_mgr *cm_ctx);
/**
* mlme_cm_get_sub_state() - get mlme substate
* cm_get_sub_state() - get mlme substate
* @cm_ctx: connection manager SM ctx
*
* API to get cm substate
*
* Return: substate of cm
*/
enum wlan_cm_sm_state mlme_cm_get_sub_state(struct cnx_mgr *cm_ctx);
enum wlan_cm_sm_state cm_get_sub_state(struct cnx_mgr *cm_ctx);
/**
* mlme_cm_set_state() - set cm mlme state
* cm_set_state() - set cm mlme state
* @cm_ctx: connection manager SM ctx
* @state: cm state
*
@ -189,9 +189,9 @@ enum wlan_cm_sm_state mlme_cm_get_sub_state(struct cnx_mgr *cm_ctx);
*
* Return: void
*/
void mlme_cm_set_state(struct cnx_mgr *cm_ctx, enum wlan_cm_sm_state state);
void cm_set_state(struct cnx_mgr *cm_ctx, enum wlan_cm_sm_state state);
/**
* mlme_cm_set_substate() - set cm mlme sub state
* cm_set_substate() - set cm mlme sub state
* @cm_ctx: connection manager SM ctx
* @substate: cm sub state
*
@ -199,11 +199,11 @@ void mlme_cm_set_state(struct cnx_mgr *cm_ctx, enum wlan_cm_sm_state state);
*
* Return: void
*/
void mlme_cm_set_substate(struct cnx_mgr *cm_ctx,
enum wlan_cm_sm_state substate);
void cm_set_substate(struct cnx_mgr *cm_ctx,
enum wlan_cm_sm_state substate);
/**
* mlme_cm_sm_state_update() - set cm mlme state and sub state
* cm_sm_state_update() - set cm mlme state and sub state
* @cm_ctx: connection manager SM ctx
* @state: cm state
* @substate: cm sub state
@ -212,12 +212,12 @@ void mlme_cm_set_substate(struct cnx_mgr *cm_ctx,
*
* Return: void
*/
void mlme_cm_sm_state_update(struct cnx_mgr *cm_ctx,
enum wlan_cm_sm_state state,
enum wlan_cm_sm_state substate);
void cm_sm_state_update(struct cnx_mgr *cm_ctx,
enum wlan_cm_sm_state state,
enum wlan_cm_sm_state substate);
/**
* mlme_cm_sm_deliver_event() - Delivers event to connection manager SM
* cm_sm_deliver_event() - Delivers event to connection manager SM
* @cm_ctx: cm ctx
* @event: CM event
* @data_len: data size
@ -229,15 +229,15 @@ void mlme_cm_sm_state_update(struct cnx_mgr *cm_ctx,
* FAILURE: on ignoring the event
*/
static inline
QDF_STATUS mlme_cm_sm_deliver_event(struct cnx_mgr *cm_ctx,
enum wlan_cm_sm_evt event,
uint16_t data_len, void *data)
QDF_STATUS cm_sm_deliver_event(struct cnx_mgr *cm_ctx,
enum wlan_cm_sm_evt event,
uint16_t data_len, void *data)
{
return wlan_sm_dispatch(cm_ctx->sm.sm_hdl, event, data_len, data);
}
/**
* wlan_mlme_cm_sm_deliver_evt() - Delivers event to CM SM
* wlan_cm_sm_deliver_evt() - Delivers event to CM SM
* @vdev: Object manager VDEV object
* @event: CM event
* @data_len: data size
@ -248,9 +248,9 @@ QDF_STATUS mlme_cm_sm_deliver_event(struct cnx_mgr *cm_ctx,
* Return: SUCCESS: on handling event
* FAILURE: on ignoring the event
*/
QDF_STATUS wlan_mlme_cm_sm_deliver_evt(struct wlan_objmgr_vdev *vdev,
enum wlan_cm_sm_evt event,
uint16_t data_len, void *data);
QDF_STATUS wlan_cm_sm_deliver_evt(struct wlan_objmgr_vdev *vdev,
enum wlan_cm_sm_evt event,
uint16_t data_len, void *data);
#endif /* FEATURE_CM_ENABLE */
#endif /* __WLAN_CM_SM_H__ */

View file

@ -104,7 +104,7 @@ static QDF_STATUS mlme_vdev_obj_create_handler(struct wlan_objmgr_vdev *vdev,
goto init_failed;
}
if (QDF_IS_STATUS_ERROR(mlme_cm_init(vdev_mlme))) {
if (QDF_IS_STATUS_ERROR(wlan_cm_init(vdev_mlme))) {
mlme_err("CM SM create failed");
goto cm_sm_create_failed;
}
@ -133,7 +133,7 @@ ext_hdl_post_create_failed:
wlan_objmgr_vdev_component_obj_detach(vdev, WLAN_UMAC_COMP_MLME,
vdev_mlme);
ext_hdl_create_failed:
mlme_cm_deinit(vdev_mlme);
wlan_cm_deinit(vdev_mlme);
cm_sm_create_failed:
mlme_vdev_sm_destroy(vdev_mlme);
init_failed:
@ -158,7 +158,7 @@ static QDF_STATUS mlme_vdev_obj_destroy_handler(struct wlan_objmgr_vdev *vdev,
return QDF_STATUS_SUCCESS;
}
mlme_cm_deinit(vdev_mlme);
wlan_cm_deinit(vdev_mlme);
mlme_vdev_sm_destroy(vdev_mlme);
mlme_vdev_ops_ext_hdl_destroy(vdev_mlme);