]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
driver_test: Added support for testing WPS without use_mlme
authorJouni Malinen <j@w1.fi>
Mon, 8 Dec 2008 19:42:01 +0000 (21:42 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 8 Dec 2008 19:42:01 +0000 (21:42 +0200)
hostapd/driver_test.c

index 4ccc48f9a59234650599845eb1d1f66f62a1f6db..397539ebb5ad2faa282106af559ae775ab40970e 100644 (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;