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
这个提交包含在:
Abhishek Singh
2020-08-28 10:13:53 +05:30
提交者 snandini
父节点 cad70ccae2
当前提交 78dc32e86c
修改 2 个文件,包含 39 行新增8 行删除

查看文件

@@ -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,
void *data);
#ifdef WLAN_FEATURE_HOST_ROAM
#ifdef WLAN_FEATURE_PREAUTH_ENABLE
#if defined(WLAN_FEATURE_HOST_ROAM) && defined(WLAN_FEATURE_PREAUTH_ENABLE)
/**
* cm_subst_preauth_entry() - Entry API for preauth sub-state for
* connection mgr
@@ -97,7 +96,7 @@ void cm_subst_preauth_exit(void *ctx);
*/
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 */
#else
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;
}
#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
* 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,
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 */
#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,
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_CM_ROAM_SM_H__ */

查看文件

@@ -626,7 +626,6 @@ struct wlan_sm_state_info cm_sm_info[] = {
cm_subst_join_active_exit,
cm_subst_join_active_event
},
#ifdef WLAN_FEATURE_HOST_ROAM
{
(uint8_t)WLAN_CM_SS_PREAUTH,
(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_event
},
#endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
{
(uint8_t)WLAN_CM_SS_ROAM_STARTED,
(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_event
},
#endif
{
(uint8_t)WLAN_CM_SS_MAX,
(uint8_t)WLAN_SM_ENGINE_STATE_NONE,