driver_test: Added support for testing WPS without use_mlme

This commit is contained in:
Jouni Malinen 2008-12-08 21:42:01 +02:00
parent eef7d7a138
commit d9f2b1c382

View file

@ -449,9 +449,15 @@ static int test_driver_new_sta(struct test_driver_data *drv,
if (sta == NULL)
return -1;
}
sta->flags &= ~(WLAN_STA_WPS | WLAN_STA_MAYBE_WPS);
if (hapd->conf->wpa) {
if (ie == NULL || ielen == 0) {
if (hapd->conf->wps_state) {
sta->flags |= WLAN_STA_WPS;
goto skip_wpa_check;
}
printf("test_driver: no IE from STA\n");
return -1;
}
@ -471,6 +477,7 @@ static int test_driver_new_sta(struct test_driver_data *drv,
return -1;
}
}
skip_wpa_check:
new_assoc = (sta->flags & WLAN_STA_ASSOC) == 0;
sta->flags |= WLAN_STA_AUTH | WLAN_STA_ASSOC;