Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor11360491136049 NetDev_MgmtExecuteCmd() Anchor11360511136051A device’s execute management command function is used to implement miscellaneous wireless management functionality such as scanning for available wireless network. Anchor11360351136035

Files

Anchor11359321135932Every wireless device driver’s net_dev.c Anchor11359331135933

Prototype

...

static CPU_INT32U NetDev_MgmtExecuteCmd (NET_IF *p_if,
   cmd,
                                                       NET_WIFI_MGR_CTX *p_ctx,
void

                                                       void             *p_cmd_data,
CPU_INT16U cmd_data_len, CPU_INT08U *p_buf_rtn, CPU_INT08U

                                                       CPU_INT16U        cmd_data_len,
                                                       CPU_INT08U       *p_buf_rtn,
                                                       CPU_INT08U        buf_rtn_len_max,
NET_ERR

                                                       NET_ERR          *p_err);
HTML Table
summary
classCode_Listing
Table Row (tr)
Table Cell (td)
rowspan2
Anchor
11533071153307
Anchor
11533081153308
Code Block

          static  CPU_INT32U  NetDev_MgmtExecuteCmd   (NET_IF           *p_if,
                                                       NET_IF_WIFI_CMD
cmd,
Anchor
11533091153309
Anchor
11533101153310
Anchor
11533111153311
Anchor
11533121153312
Anchor
11533131153313
Anchor
11533141153314
Table Row (tr)

...

11373361137336Note 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’. Anchor11359421135942static’.

Arguments

Anchor11359431135943p_if Anchor11369411136941

Pointer to the interface to handle network device I/O operations.

Anchor11376611137661cmdanchor11376621137662

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 Anchor11369561136956

Pointer to the Wireless Manager context.

Anchor11370311137031p_cmd_data Anchor11378211137821

Pointer to a buffer that contains data to be used by the driver to execute the command.

Anchor11378311137831cmd_data_len Anchor11378261137826

Command data length.

Anchor11379501137950p_buf_rtn Anchor11379451137945

Pointer to buffer that will receive return data.

...

11378471137847buf_rtn_len_max Anchor11378421137842

Return maximum data length.

...

11378221137822p_err Anchor11370261137026

Pointer to variable that will receive the return error code from this function.

...

...

Returned Value

Anchor11359501135950None. Anchor11359511135951

Required Configuration

Anchor11388101138810None. Anchor11388251138825

Notes / Warnings

...

The state machine context is used by the Wireless Manager to know what it MUST must do after the call such as waiting for a management response.