COMPANY CONFIDENTIAL
45
setmlme
Another of the host_apd support commands, this command is used to perform direct access to the MLME layer
in the driver. This allows an application to start or terminate a specific association. Note that the
MLME_ASSOC sub command only makes sense for a station (AP won’t start an association). This command
will pass the ieee80211req_mlme structure:
struct
ieee80211req_mlme
{
u_int8_t im_op;
/* operation to perform */
#define
IEEE80211_MLME_ASSOC
1
/* associate station */
#define
IEEE80211_MLME_DISASSOC
2
/* disassociate station */
#define
IEEE80211_MLME_DEAUTH
3
/* deauthenticate station */
#define
IEEE80211_MLME_AUTHORIZE
4
/* authorize station */
#define
IEEE80211_MLME_UNAUTHORIZE
5
/* unauthorize station */
u_int16_t im_reason;
/* 802.11 reason code */
u_int8_t im_macaddr[IEEE80211_ADDR_LEN];
}
;
This command has no command line equivalent.
ucastcipher
#iwpriv ath
N
ucastcipher
This command is used mainly by the host_apd authenticator, and sets the unicast cipher type to the indicated
value. See the mcastcipher command for the definition of the values. This command has a corresponding get
command, but no default value.
#iwpriv ath0 ucastcipher 2
#iwpriv ath0 get_uciphers
ath0 get_uciphers:2
ucastkeylen
#iwpriv ath
N
ucastkeylen
length
This is only valid for WEP operations. This command is used to set the key length of the WEP key for unicast
frames. Key lengths of 5 (40 bits) or 13 (104 bits) are the only valid values, corresponding to 64 or 128 bit
WEP encoding, respectively. This command has no default value. This command has a corresponding get
command.
#iwpriv ath0 ucastkeylen 5
#iwpriv ath0 get_ucastkeylen
ath0 get_ucastcipher:5
wpa
#iwpriv ath
N
wpa
WPA Mode
This command will set the desired WPA modes. The value of WPA Mode indicates the level of support;
0 = No WPA support
1 = WPA Support
2 = WPA2 Support
3 = Both WPA and WPA2 support.
This command is typically overridden by the setting in the hostapd configuration file, which uses the same
interface to set the WPA mode, so this command is nor normally used during configuration. This command has
a corresponding get command. The default value is 0.
#iwpriv ath0 wpa 3
#iwpriv ath0 get_wpa
ath0 get_wpa:0