Get WiFi-specific parameters
typedef struct {
uint32t subcmd;
uint32t size;
union ssid;
union bss_type;
union station_name;
union channel;
union auth_type;
union crypto_type;
union wep_key;
union wep_cfg;
union bss_cfg;
union signal_info;
} un;
}nic_wifi_dcmd_t;
When the driver receives a DCMD_IO_NET_WIFI devctl, it's
passed a pointer to a structure of nic_wifi_dcmd_t. This
devctl() either gets or sets various WiFi-specific parameters.
The members are defined as follows:
- subcmd
- The WiFi-specific parameter that's to be read or
configured. Either the DEVDIR_TO or
DEVDIR_FROM flag will be set in this field (these
flags are defined in <devctl.h>.)
If DEVDIR_TO is set, the devctl is supplying
information to the driver so it can set a particular property.
If DEVDIR_FROM is set, the devctl is querying the
current value of a particular property.
To determine which property is to get or set, the driver should
logically AND the value of this field with
NIC_WIFI_SUBCMD_MASK,
defined in <hw/nicinfo.h>.
- size
- Currently unused.
- ssid
- Stores the SSID (Service Set Identifier),
when the NIC_WIFI_SUBCMD_SSID property is
specified in the subcmd field.
- bss_type
- Stores the BSS (Basic Service Set) type,
when the NIC_WIFI_SUBCMD_BSS_TYPE property is
specified in the subcmd field.
Valid values for this field are:
- NIC_WIFI_BSS_TYPE_BSS -- Basic Service Set
- NIC_WIFI_BSS_TYPE_IBSS -- Independant Basic Service Set
- NIC_WIFI_BSS_TYPE_ADHOC -- Ad-hoc mode
- NIC_WIFI_BSS_TYPE_AP -- Access point
- station_name
- Stores the name of the base station, when
the NIC_WIFI_SUBCMD_STATION_NAME property is
specified in the subcmd field.
- channel
- Stores the communication channel, when the
NIC_WIFI_SUBCMD_CHANNEL property is specified in
the subcmd field.
- auth_type
- Stores the authentication type, when the
NIC_WIFI_SUBCMD_AUTH_TYPE property is specified in
the subcmd field.
Valid values are:
- NIC_WIFI_AUTH_TYPE_OPEN
- NIC_WIFI_AUTH_TYPE_SHARED_KEY
- crypto_type
- Stores the encryption type, when the
NIC_WIFI_SUBCMD_CRYPTO_TYPE property is specified in
the subcmd field.
Valid values are:
- NIC_WIFI_CRYPTO_TYPE_NONE -- no encryption
- NIC_WIFI_CRYPTO_TYPE_WEP -- Wired Equivalent Privacy
- wep_key
- Stores the encryption key, when the
NIC_WIFI_SUBCMD_CRYPTO_DATA property is
specified in the subcmd field.
This field is a structure, for which the following fields are defined:
- num -- a key identifier, which is a number between
one and four, inclusive.
- length -- the length of the key, in bytes.
- data -- the actual key.
- wep_cfg
- Stores encryption configuration information,
when the NIC_WIFI_SUBCMD_CRYPTO_CFG property is
specified in the subcmd field.
This field is a structure, for which the following field is defined:
- active_key -- selects which key is currently active.
This value may be zero (disables encryption),
or a key identifier between one and four, inclusive.
- bssid_cfg
- Stores BSS (Basic Service Set) configuration
information, when the NIC_WIFI_SUBCMD_BSSID
property is specified in the subcmd field.
This field is a structure, for which the following fields
are defined:
- macaddr -- stores the 6-byte station (MAC) address.
- channel -- stores the communication channel, which
may also be configured or read via the
NIC_WIFI_SUBCMD_CHANNEL sub-command.
- signal_info
- Stores information about the carrier signal,
when the NIC_WIFI_SUBCMD_BSSID property is specified
in the subcmd field. This is a read-only property.
This field is a structure, for which the following
fields are defined:
- radio_freq -- specifies the frequency of the carrier
signal in hundreds of megahertz, i.e. a value of 24
means 2.4 gigahertz.
- tx_rate -- specifies the data transfer bit-rate, in
hundreds of kilobits per second, i.e. a value
of 55 is 5.5 Mbits/sec.
- quality, signal_level, noise_level --
these values give percentages, rounded to the nearest decimal point,
which indicate the signal quality, signal level, and noise
level of the carrier signal, respectively.
QNX Neutrino