iPXE
Data Structures | Functions | Variables
iwmgmt_cmd.c File Reference

Wireless interface management commands. More...

#include <ipxe/netdevice.h>
#include <ipxe/net80211.h>
#include <ipxe/command.h>
#include <ipxe/parseopt.h>
#include <usr/iwmgmt.h>
#include <hci/ifmgmt_cmd.h>

Go to the source code of this file.

Data Structures

struct  iwstat_options
 "iwstat" options More...
struct  iwlist_options
 "iwlist" options More...

Functions

 FILE_LICENCE (GPL2_OR_LATER)
static int iwstat_payload (struct net_device *netdev, struct iwstat_options *opts __unused)
 "iwstat" payload
static int iwstat_exec (int argc, char **argv)
 The "iwstat" command.
static int iwlist_payload (struct net_device *netdev, struct iwlist_options *opts __unused)
 "iwlist" payload
static int iwlist_exec (int argc, char **argv)
 The "iwlist" command.

Variables

static struct option_descriptor iwstat_opts [] = {}
 "iwstat" option list
static struct
ifcommon_command_descriptor 
iwstat_cmd
 "iwstat" command descriptor
static struct option_descriptor iwlist_opts [] = {}
 "iwlist" option list
static struct
ifcommon_command_descriptor 
iwlist_cmd
 "iwlist" command descriptor
struct command iwmgmt_commands[] __command
 Wireless interface management commands.

Detailed Description

Wireless interface management commands.

Definition in file iwmgmt_cmd.c.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER  )
static int iwstat_payload ( struct net_device netdev,
struct iwstat_options *opts  __unused 
) [static]

"iwstat" payload

Parameters:
netdevNetwork device
optsCommand options
Return values:
rcReturn status code

Definition at line 48 of file iwmgmt_cmd.c.

References iwstat(), and net80211_get().

                                                                   {
        struct net80211_device *dev = net80211_get ( netdev );

        if ( dev )
                iwstat ( dev );

        return 0;
}
static int iwstat_exec ( int  argc,
char **  argv 
) [static]

The "iwstat" command.

Parameters:
argcArgument count
argvArgument list
Return values:
rcReturn status code

Definition at line 71 of file iwmgmt_cmd.c.

References ifcommon_exec().

                                                 {
        return ifcommon_exec ( argc, argv, &iwstat_cmd );
}
static int iwlist_payload ( struct net_device netdev,
struct iwlist_options *opts  __unused 
) [static]

"iwlist" payload

Parameters:
netdevNetwork device
optsCommand options
Return values:
rcReturn status code

Definition at line 88 of file iwmgmt_cmd.c.

References iwlist(), and net80211_get().

                                                                   {
        struct net80211_device *dev = net80211_get ( netdev );

        if ( dev )
                return iwlist ( dev );

        return 0;
}
static int iwlist_exec ( int  argc,
char **  argv 
) [static]

The "iwlist" command.

Parameters:
argcArgument count
argvArgument list
Return values:
rcReturn status code

Definition at line 111 of file iwmgmt_cmd.c.

References ifcommon_exec().

                                                 {
        return ifcommon_exec ( argc, argv, &iwlist_cmd );
}

Variable Documentation

struct option_descriptor iwstat_opts[] = {} [static]

"iwstat" option list

Definition at line 39 of file iwmgmt_cmd.c.

Initial value:

"iwstat" command descriptor

Definition at line 59 of file iwmgmt_cmd.c.

struct option_descriptor iwlist_opts[] = {} [static]

"iwlist" option list

Definition at line 79 of file iwmgmt_cmd.c.

Initial value:

"iwlist" command descriptor

Definition at line 99 of file iwmgmt_cmd.c.

struct command iwmgmt_commands [] __command
Initial value:
 {
        {
                .name = "iwstat",
                .exec = iwstat_exec,
        },
        {
                .name = "iwlist",
                .exec = iwlist_exec,
        },
}

Wireless interface management commands.

Definition at line 116 of file iwmgmt_cmd.c.