{
u8 key[32];
size_t keylen;
- wpa_alg alg;
+ enum wpa_alg alg;
u8 seq[6] = { 0 };
/* IBSS/WPA-None uses only one key (Group) for both receiving and
* @state: State (wpa_state; WPA_*)
* Returns: The state name as a printable text string
*/
-const char * wpa_supplicant_state_txt(int state)
+const char * wpa_supplicant_state_txt(enum wpa_states state)
{
switch (state) {
case WPA_DISCONNECTED:
* This function is called whenever the connection state changes, e.g.,
* association is completed for WPA/WPA2 4-Way Handshake is started.
*/
-void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s, wpa_states state)
+void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
+ enum wpa_states state)
{
wpa_printf(MSG_DEBUG, "State: %s -> %s",
wpa_supplicant_state_txt(wpa_s->wpa_state),
static void wpa_supplicant_clear_status(struct wpa_supplicant *wpa_s)
{
- wpa_states old_state = wpa_s->wpa_state;
+ enum wpa_states old_state = wpa_s->wpa_state;
wpa_s->pairwise_cipher = 0;
wpa_s->group_cipher = 0;
wpa_s->mgmt_group_cipher = 0;
}
-static wpa_cipher cipher_suite2driver(int cipher)
+static enum wpa_cipher cipher_suite2driver(int cipher)
{
switch (cipher) {
case WPA_CIPHER_NONE:
}
-static wpa_key_mgmt key_mgmt2driver(int key_mgmt)
+static enum wpa_key_mgmt key_mgmt2driver(int key_mgmt)
{
switch (key_mgmt) {
case WPA_KEY_MGMT_NONE:
size_t wpa_ie_len;
int use_crypt, ret, i, bssid_changed;
int algs = AUTH_ALG_OPEN_SYSTEM;
- wpa_cipher cipher_pairwise, cipher_group;
+ enum wpa_cipher cipher_pairwise, cipher_group;
struct wpa_driver_associate_params params;
int wep_keys_set = 0;
struct wpa_driver_capa capa;
wpa_s->drv_priv = wpa_drv_init(wpa_s, wpa_s->ifname);
if (wpa_s->drv_priv == NULL) {
const char *pos;
- pos = os_strchr(driver, ',');
+ pos = driver ? os_strchr(driver, ',') : NULL;
if (pos) {
wpa_printf(MSG_DEBUG, "Failed to initialize driver "
"interface - try next driver wrapper");