NetDev_MgmtExecuteCmd()
A device’s execute management command function is used to implement miscellaneous wireless management functionality such as scanning for available wireless network.
Files
Every wireless device driver’s net_dev.c
Prototype
static CPU_INT32U NetDev_MgmtExecuteCmd (NET_IF *p_if, NET_IF_WIFI_CMD cmd, NET_WIFI_MGR_CTX *p_ctx, void *p_cmd_data, CPU_INT16U cmd_data_len, CPU_INT08U *p_buf_rtn, CPU_INT08U buf_rtn_len_max, NET_ERR *p_err);
Note that since every device driver’s MgmtDemux()
function is accessed only by function pointer via the device driver’s API structure, it doesn’t need to be globally available and should therefore be declared as ‘static
’.
Arguments
p_if
Pointer to the interface to handle network device I/O operations.
cmd
Management command to execute:
NET_IF_WIFI_CMD_SCAN
NET_IF_WIFI_CMD_JOIN
NET_IF_WIFI_CMD_LEAVE
NET_IF_IO_CTRL_LINK_STATE_GET
NET_IF_IO_CTRL_LINK_STATE_GET_INFO
NET_IF_IO_CTRL_LINK_STATE_UPDATE
Others management commands defined by the driver.
p_ctx
Pointer to the Wireless Manager context.
p_cmd_data
Pointer to a buffer that contains data to be used by the driver to execute the command.
cmd_data_len
Command data length.
p_buf_rtn
Pointer to buffer that will receive return data.
buf_rtn_len_max
Return maximum data length.
p_err
Pointer to variable that will receive the return error code from this function.
Returned Value
None.
Required Configuration
None.
Notes / Warnings
The state machine context is used by the Wireless Manager to know what it must do after the call such as waiting for a management response.