qcacmn: Fix the connection manager state machine init failure

The state machine infra require the states in sequence and addition
of if define in the wlan_sm_state_info will lead to state machine
init failure.

Fix this by removing the if define from the wlan_sm_state_info and
adding the dummy func for not define cases.

Change-Id: I5c5cb7837774954183a8ea1683c401441fb48bab
CRs-Fixed: 2764953
This commit is contained in:
Abhishek Singh
2020-08-28 10:13:53 +05:30
committed by snandini
parent cad70ccae2
commit 78dc32e86c
2 changed files with 39 additions and 8 deletions

View File

@@ -59,8 +59,7 @@ void cm_state_roaming_exit(void *ctx);
bool cm_state_roaming_event(void *ctx, uint16_t event, uint16_t data_len, bool cm_state_roaming_event(void *ctx, uint16_t event, uint16_t data_len,
void *data); void *data);
#ifdef WLAN_FEATURE_HOST_ROAM #if defined(WLAN_FEATURE_HOST_ROAM) && defined(WLAN_FEATURE_PREAUTH_ENABLE)
#ifdef WLAN_FEATURE_PREAUTH_ENABLE
/** /**
* cm_subst_preauth_entry() - Entry API for preauth sub-state for * cm_subst_preauth_entry() - Entry API for preauth sub-state for
* connection mgr * connection mgr
@@ -97,7 +96,7 @@ void cm_subst_preauth_exit(void *ctx);
*/ */
bool cm_subst_preauth_event(void *ctx, uint16_t event, bool cm_subst_preauth_event(void *ctx, uint16_t event,
uint16_t data_len, void *data); uint16_t data_len, void *data);
#else /* WLAN_FEATURE_PREAUTH_ENABLE && WLAN_FEATURE_HOST_ROAM */ #else
static inline void cm_subst_preauth_entry(void *ctx) {} static inline void cm_subst_preauth_entry(void *ctx) {}
@@ -108,8 +107,9 @@ static inline bool cm_subst_preauth_event(void *ctx, uint16_t event,
{ {
return true; return true;
} }
#endif /* WLAN_FEATURE_PREAUTH_ENABLE */ #endif /* WLAN_FEATURE_HOST_ROAM && WLAN_FEATURE_PREAUTH_ENABLE */
#ifdef WLAN_FEATURE_HOST_ROAM
/** /**
* cm_subst_reassoc_entry() - Entry API for reassoc sub-state for * cm_subst_reassoc_entry() - Entry API for reassoc sub-state for
* connection mgr * connection mgr
@@ -146,6 +146,17 @@ void cm_subst_reassoc_exit(void *ctx);
*/ */
bool cm_subst_reassoc_event(void *ctx, uint16_t event, uint16_t data_len, bool cm_subst_reassoc_event(void *ctx, uint16_t event, uint16_t data_len,
void *data); void *data);
#else
static inline void cm_subst_reassoc_entry(void *ctx) {}
static inline void cm_subst_reassoc_exit(void *ctx) {}
static inline
bool cm_subst_reassoc_event(void *ctx, uint16_t event, uint16_t data_len,
void *data)
{
return true;
}
#endif /* WLAN_FEATURE_HOST_ROAM */ #endif /* WLAN_FEATURE_HOST_ROAM */
#ifdef WLAN_FEATURE_ROAM_OFFLOAD #ifdef WLAN_FEATURE_ROAM_OFFLOAD
@@ -223,6 +234,30 @@ void cm_subst_roam_sync_exit(void *ctx);
*/ */
bool cm_subst_roam_sync_event(void *ctx, uint16_t event, uint16_t data_len, bool cm_subst_roam_sync_event(void *ctx, uint16_t event, uint16_t data_len,
void *data); void *data);
#else
static inline void cm_subst_roam_start_entry(void *ctx) {}
static inline void cm_subst_roam_start_exit(void *ctx) {}
static inline
bool cm_subst_roam_start_event(void *ctx, uint16_t event, uint16_t data_len,
void *data)
{
return true;
}
static inline void cm_subst_roam_sync_entry(void *ctx) {}
static inline void cm_subst_roam_sync_exit(void *ctx) {}
static inline
bool cm_subst_roam_sync_event(void *ctx, uint16_t event, uint16_t data_len,
void *data)
{
return true;
}
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */ #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
#endif /* __WLAN_CM_ROAM_SM_H__ */ #endif /* __WLAN_CM_ROAM_SM_H__ */

View File

@@ -626,7 +626,6 @@ struct wlan_sm_state_info cm_sm_info[] = {
cm_subst_join_active_exit, cm_subst_join_active_exit,
cm_subst_join_active_event cm_subst_join_active_event
}, },
#ifdef WLAN_FEATURE_HOST_ROAM
{ {
(uint8_t)WLAN_CM_SS_PREAUTH, (uint8_t)WLAN_CM_SS_PREAUTH,
(uint8_t)WLAN_CM_S_ROAMING, (uint8_t)WLAN_CM_S_ROAMING,
@@ -647,8 +646,6 @@ struct wlan_sm_state_info cm_sm_info[] = {
cm_subst_reassoc_exit, cm_subst_reassoc_exit,
cm_subst_reassoc_event cm_subst_reassoc_event
}, },
#endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
{ {
(uint8_t)WLAN_CM_SS_ROAM_STARTED, (uint8_t)WLAN_CM_SS_ROAM_STARTED,
(uint8_t)WLAN_CM_S_ROAMING, (uint8_t)WLAN_CM_S_ROAMING,
@@ -669,7 +666,6 @@ struct wlan_sm_state_info cm_sm_info[] = {
cm_subst_roam_sync_exit, cm_subst_roam_sync_exit,
cm_subst_roam_sync_event cm_subst_roam_sync_event
}, },
#endif
{ {
(uint8_t)WLAN_CM_SS_MAX, (uint8_t)WLAN_CM_SS_MAX,
(uint8_t)WLAN_SM_ENGINE_STATE_NONE, (uint8_t)WLAN_SM_ENGINE_STATE_NONE,