TASK_SM
[SM]

Declaration of the SM state machine. More...

Collaboration diagram for TASK_SM:

Data Structures

struct  sm_connect_req
 Structure containing the parameters of SM_CONNECT_REQ message. More...
struct  sm_connect_cfm
 Structure containing the parameters of the SM_CONNECT_CFM message. More...
struct  sm_connect_ind
 Structure containing the parameters of the SM_CONNECT_IND message. More...
struct  sm_disconnect_req
 Structure containing the parameters of the SM_DISCONNECT_REQ message. More...
struct  sm_disconnect_ind
 Structure containing the parameters of the SM_DISCONNECT_IND message. More...
struct  sm_external_auth_required_ind
 Structure containing the parameters of the SM_EXTERNAL_AUTH_REQUIRED_IND. More...
struct  sm_external_auth_required_rsp
 Structure containing the parameters of the SM_EXTERNAL_AUTH_REQUIRED_RSP. More...

Defines

#define SM_IDX_MAX   1
 Task max index number.
#define SM_ASSOC_IE_LEN   800
 Maximum length of the ASSOC_REQ + ASSOC_RSP information elements forwarded to the host after association.

Enumerations

enum  sm_state_tag {
  SM_IDLE, SM_SCANNING, SM_JOINING, SM_STA_ADDING,
  SM_BSS_PARAM_SETTING, SM_AUTHENTICATING, SM_EXTERNAL_AUTHENTICATING, SM_ASSOCIATING,
  SM_ACTIVATING, SM_DISCONNECTING, SM_STATE_MAX
}
 

SM task possible states.

More...
enum  sm_msg_tag {
  SM_CONNECT_REQ = KE_FIRST_MSG(TASK_SM), SM_CONNECT_CFM, SM_CONNECT_IND, SM_DISCONNECT_REQ,
  SM_DISCONNECT_CFM, SM_DISCONNECT_IND, SM_EXTERNAL_AUTH_REQUIRED_IND, SM_EXTERNAL_AUTH_REQUIRED_RSP,
  SM_RSP_TIMEOUT_IND
}
 

Message API of the SM task.

More...

Functions

static int sm_connect_req_handler (ke_msg_id_t const msgid, struct sm_connect_req const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id)
 SM_CONNECT_REQ message handler.
static int sm_disconnect_req_handler (ke_msg_id_t const msgid, struct sm_disconnect_req const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id)
 SM_DISCONNECT_REQ message handler.
static int mm_connection_loss_ind_handler (ke_msg_id_t const msgid, struct mm_connection_loss_ind const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id)
 MM_CONNECTION_LOSS_IND message handler.
static int sm_rsp_timeout_ind_handler (ke_msg_id_t const msgid, void const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id)
 SM_RSP_TIMEOUT_IND message handler.
static int scanu_start_cfm_handler (ke_msg_id_t const msgid, void const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id)
 SCANU_START_CFM message handler.
static int scanu_join_cfm_handler (ke_msg_id_t const msgid, void const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id)
 SCANU_JOIN_CFM message handler.
static int mm_sta_add_cfm_handler (ke_msg_id_t const msgid, struct mm_sta_add_cfm const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id)
 MM_STA_ADD_CFM message handler.
static int me_set_ps_disable_cfm_handler (ke_msg_id_t const msgid, void const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id)
 ME_SET_PS_DISABLE_CFM message handler.
static int mm_bss_param_setting_handler (ke_msg_id_t const msgid, void const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id)
 BSS parameter setting message handler.
static int me_set_active_cfm_handler (ke_msg_id_t const msgid, void const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id)
 ME_SET_ACTIVE_CFM message handler.
static int mm_set_vif_state_cfm_handler (ke_msg_id_t const msgid, void const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id)
 MM_SET_VIF_STATE_CFM message handler.
static int mm_sta_del_cfm_handler (ke_msg_id_t const msgid, struct mm_sta_del_cfm const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id)
 MM_STA_DEL_CFM message handler.
static int mm_chan_ctxt_unlink_cfm_handler (ke_msg_id_t const msgid, void const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id)
 MM_CHAN_CTXT_UNLINK_CFM message handler.
static int rxu_mgt_ind_handler (ke_msg_id_t const msgid, struct rxu_mgt_ind const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id)
 RXU_MGT_IND message handler.
static int sm_external_auth_required_rsp_handler (ke_msg_id_t const msgid, struct sm_external_auth_required_rsp const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id)
 SM_EXTERNAL_AUTH_REQUIRED_RSP message handler.

Variables

struct ke_msg_handler sm_default_state []
 DEFAULT handler definition.
struct ke_state_handler sm_default_handler
 Specifies the message handlers that are common to all states.
ke_state_t sm_state [SM_IDX_MAX]
 Defines the placeholder for the states of all the task instances.
struct ke_state_handler sm_default_handler
 Default state handler of the SM task.
ke_state_t sm_state [SM_IDX_MAX]
 Table including the state of each instance of the SM task.

Detailed Description

Declaration of the SM state machine.


Enumeration Type Documentation

enum sm_msg_tag

Message API of the SM task.

Enumerator:
SM_CONNECT_REQ 

Request to connect to an AP.

SM_CONNECT_CFM 

Confirmation of connection.

SM_CONNECT_IND 

Indicates that the SM associated to the AP.

SM_DISCONNECT_REQ 

Request to disconnect.

SM_DISCONNECT_CFM 

Confirmation of disconnection.

SM_DISCONNECT_IND 

Indicates that the SM disassociated the AP.

SM_EXTERNAL_AUTH_REQUIRED_IND 

Request to start external authentication.

SM_EXTERNAL_AUTH_REQUIRED_RSP 

Response to external authentication request.

SM_RSP_TIMEOUT_IND 

Timeout message for procedures requiring a response from peer.

Definition at line 59 of file sm_task.h.

SM task possible states.

Enumerator:
SM_IDLE 

IDLE state.

SM_SCANNING 

SCANNING state.

SM_JOINING 

JOIN state.

SM_STA_ADDING 

Addition of station.

SM_BSS_PARAM_SETTING 

Configuration of BSS parameters.

SM_AUTHENTICATING 

AUTHENTICATE state.

SM_EXTERNAL_AUTHENTICATING 

EXTERNAL AUTHENTICATE state.

SM_ASSOCIATING 

ASSOCIATE state.

SM_ACTIVATING 

ACTIVATE state.

SM_DISCONNECTING 

DISCONNECTING state.

SM_STATE_MAX 

Number of states.

Definition at line 32 of file sm_task.h.


Function Documentation

static int me_set_active_cfm_handler ( ke_msg_id_t const   msgid,
void const *  param,
ke_task_id_t const   dest_id,
ke_task_id_t const   src_id 
) [static]

ME_SET_ACTIVE_CFM message handler.

This function handles the confirmation of move to active state that allows starting the AUTH/ASSOC_REQ exchanges.

Parameters:
[in] msgid Id of the message received (probably unused)
[in] param Pointer to the parameters of the message.
[in] dest_id TaskId of the receiving task.
[in] src_id TaskId of the sending task.
Returns:
Whether the message was consumed or not.

Definition at line 557 of file sm_task.c.

References ASSERT_ERR, sm_connect_req::auth_type, BSS_CAPA_RESET, vif_info_tag::bss_info, sm_env_tag::connect_param, sm_env_tag::disconnect_ind, sm_env_tag::ft_over_ds, sm_env_tag::host_disconnect, ke_msg2param(), KE_MSG_CONSUMED, ke_msg_send(), ke_msg_send_basic(), ke_state_get(), ke_state_set(), MAC_ST_FAILURE, sm_assoc_req_send(), sm_auth_send(), SM_BSS_PARAM_SETTING, sm_connect_ind(), SM_DISCONNECT_CFM, SM_DISCONNECTING, sm_env, sm_external_auth_start(), sm_get_bss_params(), SM_IDLE, sm_join_bss(), TASK_SM, and sm_env_tag::vif_disconnect.

static int me_set_ps_disable_cfm_handler ( ke_msg_id_t const   msgid,
void const *  param,
ke_task_id_t const   dest_id,
ke_task_id_t const   src_id 
) [static]

ME_SET_PS_DISABLE_CFM message handler.

This function starts the procedure of BSS parameter setting.

Parameters:
[in] msgid Id of the message received (probably unused)
[in] param Pointer to the parameters of the message.
[in] dest_id TaskId of the receiving task.
[in] src_id TaskId of the sending task.
Returns:
Whether the message was consumed or not.

Definition at line 496 of file sm_task.c.

References ASSERT_ERR, KE_MSG_CONSUMED, ke_state_get(), sm_bss_config_send(), SM_BSS_PARAM_SETTING, SM_DISCONNECTING, SM_IDLE, and TASK_SM.

static int mm_bss_param_setting_handler ( ke_msg_id_t const   msgid,
void const *  param,
ke_task_id_t const   dest_id,
ke_task_id_t const   src_id 
) [static]

BSS parameter setting message handler.

This function handles all the confirmation of the BSS parameter setting requests sent during the connection process. It pushes the next parameter setting request.

Parameters:
[in] msgid Id of the message received (probably unused)
[in] param Pointer to the parameters of the message.
[in] dest_id TaskId of the receiving task.
[in] src_id TaskId of the sending task.
Returns:
Whether the message was consumed or not.

Definition at line 530 of file sm_task.c.

References ASSERT_ERR, KE_MSG_CONSUMED, ke_state_get(), sm_bss_config_send(), SM_BSS_PARAM_SETTING, and TASK_SM.

static int mm_chan_ctxt_unlink_cfm_handler ( ke_msg_id_t const   msgid,
void const *  param,
ke_task_id_t const   dest_id,
ke_task_id_t const   src_id 
) [static]

MM_CHAN_CTXT_UNLINK_CFM message handler.

This function is called once the channel context associated to a VIF has been unlinked.

Parameters:
[in] msgid Id of the message received (probably unused)
[in] param Pointer to the parameters of the message.
[in] dest_id TaskId of the receiving task.
[in] src_id TaskId of the sending task.
Returns:
Whether the message was consumed or not.

Definition at line 736 of file sm_task.c.

References ASSERT_ERR, KE_MSG_CONSUMED, ke_state_get(), sm_bss_config_send(), SM_DISCONNECTING, and TASK_SM.

static int mm_connection_loss_ind_handler ( ke_msg_id_t const   msgid,
struct mm_connection_loss_ind const *  param,
ke_task_id_t const   dest_id,
ke_task_id_t const   src_id 
) [static]

MM_CONNECTION_LOSS_IND message handler.

This message indicates that network connection with the associated AP has been lost.

Parameters:
[in] msgid Id of the message received (probably unused)
[in] param Pointer to the parameters of the message.
[in] dest_id TaskId of the receiving task.
[in] src_id TaskId of the sending task.
Returns:
Whether the message was consumed or not.

Definition at line 190 of file sm_task.c.

References vif_info_tag::active, mm_connection_loss_ind::inst_nbr, KE_MSG_CONSUMED, KE_MSG_SAVED, ke_state_get(), ke_state_set(), MAC_RS_UNSPECIFIED, sm_disconnect_process(), SM_DISCONNECTING, SM_IDLE, TASK_SM, vif_info_tag::type, vif_info_tab, and VIF_STA.

static int mm_set_vif_state_cfm_handler ( ke_msg_id_t const   msgid,
void const *  param,
ke_task_id_t const   dest_id,
ke_task_id_t const   src_id 
) [static]

MM_SET_VIF_STATE_CFM message handler.

This function is called once the VIF has been put to active state at the end of the association procedure, or to inactive state upon disconnection.

Parameters:
[in] msgid Id of the message received (probably unused)
[in] param Pointer to the parameters of the message.
[in] dest_id TaskId of the receiving task.
[in] src_id TaskId of the sending task.
Returns:
Whether the message was consumed or not.

Definition at line 640 of file sm_task.c.

References co_ntohs(), sm_env_tag::connect_param, CONTROL_PORT_HOST, sm_connect_req::ctrl_port_ethertype, sta_info_tag::ctrl_port_ethertype, sta_info_tag::ctrl_port_state, mm_set_ps_options_req::dont_listen_bc_mc, sm_connect_req::dont_wait_bcmc, vif_info_tag::flags, KE_MSG_ALLOC, KE_MSG_CONSUMED, ke_msg_send(), ke_state_get(), sm_connect_req::listen_interval, mm_set_ps_options_req::listen_interval, MAC_ST_SUCCESSFUL, ME_SET_PS_DISABLE_REQ, MM_SET_PS_OPTIONS_REQ, PORT_CONTROLED, PORT_OPEN, me_set_ps_disable_req::ps_disable, SM_ACTIVATING, sm_bss_config_send(), sm_connect_ind(), SM_DISCONNECTING, sm_env, vif_info_tag::sta, sta_info_tab, TASK_ME, TASK_MM, TASK_SM, vif_info_tag::u, me_set_ps_disable_req::vif_idx, sm_connect_req::vif_idx, mm_set_ps_options_req::vif_index, and vif_info_tab.

static int mm_sta_add_cfm_handler ( ke_msg_id_t const   msgid,
struct mm_sta_add_cfm const *  param,
ke_task_id_t const   dest_id,
ke_task_id_t const   src_id 
) [static]

MM_STA_ADD_CFM message handler.

This function handles the STA addition confirmation message.

Parameters:
[in] msgid Id of the message received (probably unused)
[in] param Pointer to the parameters of the message.
[in] dest_id TaskId of the receiving task.
[in] src_id TaskId of the sending task.
Returns:
Whether the message was consumed or not.

Definition at line 425 of file sm_task.c.

References ASSERT_ERR, BSS_CAPA, vif_info_tag::bss_info, CO_OK, me_bss_info::ht_cap, sta_capa_info::ht_cap, sta_info_tag::info, sta_info_tag::inst_nbr, KE_MSG_CONSUMED, ke_state_get(), MAC_ST_FAILURE, me_init_rate(), me_set_sta_ht_vht_param(), me_bss_info::rate_set, sta_capa_info::rate_set, sm_connect_ind(), sm_set_bss_param(), SM_STA_ADDING, STA_CAPA_SET, mm_sta_add_cfm::sta_idx, sta_info_tab, mm_sta_add_cfm::status, TASK_SM, and vif_info_tab.

static int mm_sta_del_cfm_handler ( ke_msg_id_t const   msgid,
struct mm_sta_del_cfm const *  param,
ke_task_id_t const   dest_id,
ke_task_id_t const   src_id 
) [static]

MM_STA_DEL_CFM message handler.

This function is called once the STA element associated to a VIF has been deleted.

Parameters:
[in] msgid Id of the message received (probably unused)
[in] param Pointer to the parameters of the message.
[in] dest_id TaskId of the receiving task.
[in] src_id TaskId of the sending task.
Returns:
Whether the message was consumed or not.

Definition at line 709 of file sm_task.c.

References ASSERT_ERR, KE_MSG_CONSUMED, ke_state_get(), sm_bss_config_send(), SM_DISCONNECTING, and TASK_SM.

static int rxu_mgt_ind_handler ( ke_msg_id_t const   msgid,
struct rxu_mgt_ind const *  param,
ke_task_id_t const   dest_id,
ke_task_id_t const   src_id 
) [static]

RXU_MGT_IND message handler.

This function handles the reception of the AUTH/(RE)ASSOCRSP/DEAUTH/DISASSOC frames and dispatch them to the correct function.

Parameters:
[in] msgid Id of the message received (probably unused)
[in] param Pointer to the parameters of the message.
[in] dest_id TaskId of the receiving task.
[in] src_id TaskId of the sending task.
Returns:
Whether the message was consumed or not.

Definition at line 763 of file sm_task.c.

References co_read8p(), CPU2HW, rxu_mgt_ind::framectrl, KE_MSG_CONSUMED, ke_state_get(), MAC_ACTION_CATEGORY_OFT, MAC_FCTRL_ACTION, MAC_FCTRL_ASSOCRSP, MAC_FCTRL_AUTHENT, MAC_FCTRL_DEAUTHENT, MAC_FCTRL_DISASSOC, MAC_FCTRL_REASSOCRSP, MAC_FCTRL_TYPESUBTYPE_MASK, MAC_SA_QUERY_ACTION_CATEGORY, rxu_mgt_ind::payload, sm_assoc_rsp_handler(), SM_ASSOCIATING, sm_auth_handler(), SM_AUTHENTICATING, sm_deauth_handler(), sm_sa_query_handler(), and TASK_SM.

static int scanu_join_cfm_handler ( ke_msg_id_t const   msgid,
void const *  param,
ke_task_id_t const   dest_id,
ke_task_id_t const   src_id 
) [static]
static int scanu_start_cfm_handler ( ke_msg_id_t const   msgid,
void const *  param,
ke_task_id_t const   dest_id,
ke_task_id_t const   src_id 
) [static]

SCANU_START_CFM message handler.

This function handles scan confirmation from the scan module.

Parameters:
[in] msgid Id of the message received (probably unused)
[in] param Pointer to the parameters of the message.
[in] dest_id TaskId of the receiving task.
[in] src_id TaskId of the sending task.
Returns:
Whether the message was consumed or not.

Definition at line 258 of file sm_task.c.

References ASSERT_ERR, KE_MSG_CONSUMED, ke_state_get(), MAC_ST_FAILURE, sm_connect_ind(), sm_get_bss_params(), sm_join_bss(), SM_SCANNING, and TASK_SM.

static int sm_connect_req_handler ( ke_msg_id_t const   msgid,
struct sm_connect_req const *  param,
ke_task_id_t const   dest_id,
ke_task_id_t const   src_id 
) [static]

SM_CONNECT_REQ message handler.

This message Requests the UMAC to join and associate to a specific AP.

Parameters:
[in] msgid Id of the message received (probably unused)
[in] param Pointer to the parameters of the message.
[in] dest_id TaskId of the receiving task.
[in] src_id TaskId of the sending task.
Returns:
Whether the message was consumed or not.

Definition at line 49 of file sm_task.c.

References vif_info_tag::active, ASSERT_ERR, sm_connect_req::auth_type, vif_info_tag::bssid, vif_info_tag::chan_ctxt, CO_BUSY, CO_OK, CO_OP_IN_PROGRESS, sm_env_tag::connect_ind, sm_env_tag::connect_param, CPU2HW, sm_env_tag::ft_old_bssid, sm_env_tag::ft_over_ds, sm_connect_req::ie_buf, sm_connect_req::ie_len, INVALID_STA_IDX, KE_MSG_ALLOC, KE_MSG_CONSUMED, KE_MSG_NO_FREE, KE_MSG_SAVED, ke_msg_send(), ke_state_get(), ke_state_set(), PROF_FT_OVER_DS_REQ_CLR, PROF_FT_OVER_DS_REQ_SET, SM_CONNECT_CFM, SM_CONNECT_IND, sm_disconnect_process(), SM_DISCONNECTING, sm_env, sm_get_bss_params(), sm_get_rsnie_pmkid_count(), SM_IDLE, sm_join_bss(), sm_scan_bss(), vif_info_tag::sta, sm_connect_cfm::status, TASK_SM, vif_info_tag::type, vif_info_tag::u, sm_connect_req::vif_idx, vif_info_tab, and VIF_STA.

static int sm_disconnect_req_handler ( ke_msg_id_t const   msgid,
struct sm_disconnect_req const *  param,
ke_task_id_t const   dest_id,
ke_task_id_t const   src_id 
) [static]

SM_DISCONNECT_REQ message handler.

This message Requests the UMAC to disconnect from a specific AP

Parameters:
[in] msgid Id of the message received (probably unused)
[in] param Pointer to the parameters of the message.
[in] dest_id TaskId of the receiving task.
[in] src_id TaskId of the sending task.
Returns:
Whether the message was consumed or not.

Definition at line 163 of file sm_task.c.

References KE_MSG_CONSUMED, KE_MSG_SAVED, ke_state_get(), sm_disconnect_req::reason_code, sm_disconnect(), SM_IDLE, TASK_SM, and sm_disconnect_req::vif_idx.

static int sm_external_auth_required_rsp_handler ( ke_msg_id_t const   msgid,
struct sm_external_auth_required_rsp const *  param,
ke_task_id_t const   dest_id,
ke_task_id_t const   src_id 
) [static]

SM_EXTERNAL_AUTH_REQUIRED_RSP message handler.

This function handles the reception of the SM_EXTERNAL_AUTH_REQUIRED_RSP message sent by the host once the external authentication is completed

Parameters:
[in] msgid Id of the message received.
[in] param Pointer to the parameters of the message.
[in] dest_id TaskId of the receiving task.
[in] src_id TaskId of the sending task.
Returns:
Whether the message was consumed or not.

Definition at line 816 of file sm_task.c.

References ASSERT_ERR, KE_MSG_CONSUMED, ke_state_get(), sm_external_auth_end(), SM_EXTERNAL_AUTHENTICATING, sm_external_auth_required_rsp::status, and TASK_SM.

static int sm_rsp_timeout_ind_handler ( ke_msg_id_t const   msgid,
void const *  param,
ke_task_id_t const   dest_id,
ke_task_id_t const   src_id 
) [static]

SM_RSP_TIMEOUT_IND message handler.

This message indicates that the programmed AUTH or ASSOC_REQ frame were not successfully transmitted.

Parameters:
[in] msgid Id of the message received (probably unused)
[in] param Pointer to the parameters of the message.
[in] dest_id TaskId of the receiving task.
[in] src_id TaskId of the sending task.
Returns:
Whether the message was consumed or not.

Definition at line 227 of file sm_task.c.

References KE_MSG_CONSUMED, ke_state_get(), MAC_ST_FAILURE, SM_ASSOCIATING, SM_AUTHENTICATING, sm_connect_ind(), SM_EXTERNAL_AUTHENTICATING, and TASK_SM.


Variable Documentation

Initial value:

Specifies the message handlers that are common to all states.

Default state handler of the SM task.

Definition at line 857 of file sm_task.c.

ke_state_t sm_state[SM_IDX_MAX]

Defines the placeholder for the states of all the task instances.

Table including the state of each instance of the SM task.

Definition at line 861 of file sm_task.c.

Referenced by sm_frame_tx_cfm_handler().


Generated on 14 Jan 2020 for Ceva-RW WLAN FullMAC SW documentation by  doxygen 1.6.1