diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-02-16 20:11:20 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-02-16 20:11:20 +0100 |
commit | 064a987bd8b3f3172bce73522cab9b21587bbc0e (patch) | |
tree | 4357360c7a03e46e792b007398ff0d7e33800223 /sys/src/cmd/aux/wpa.c | |
parent | 3ea0572f4f467f8f0712da7040a3dd163ac2dd0e (diff) |
wpa: dont send initial "start" message, faster polling interval waiting for connection
the kernel will automatically timeout the eap blocked state
for us and reassociate for us, so there is no need to provoke
the ap to start the wpa/eap handshake.
make the polling faster changing the sleep time from 500 to
100 ms.
Diffstat (limited to 'sys/src/cmd/aux/wpa.c')
-rw-r--r-- | sys/src/cmd/aux/wpa.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/sys/src/cmd/aux/wpa.c b/sys/src/cmd/aux/wpa.c index 76551d7eb..39a3be574 100644 --- a/sys/src/cmd/aux/wpa.c +++ b/sys/src/cmd/aux/wpa.c @@ -208,7 +208,7 @@ getbssid(uchar mac[Eaddrlen]) } int -connected(int assoc) +connected(void) { char status[1024]; @@ -218,10 +218,6 @@ connected(int assoc) return 0; if(strcmp(status, "unauthenticated") == 0) return 0; - if(assoc){ - if(strcmp(status, "blocked") != 0 && strcmp(status, "associated") != 0) - return 0; - } if(debug) fprint(2, "status: %s\n", status); return 1; @@ -1219,8 +1215,8 @@ main(int argc, char *argv[]) Connect: /* bss scan might not be complete yet, so check for 10 seconds. */ - for(try = 10; (background || try >= 0) && !connected(0); try--) - sleep(1000); + for(try = 100; (background || try >= 0) && !connected(); try--) + sleep(100); ispsk = 1; if(rsnelen <= 0 || rsne == brsne){ @@ -1287,13 +1283,6 @@ Connect: } } - /* wait for getting associated before sending start message */ - for(try = 10; (background || try >= 0) && !connected(1); try--) - sleep(500); - - if(getbssid(conn.amac) == 0) - eapwrite(&conn, nil, 0); - lastrepc = 0ULL; for(;;){ uchar *p, *e, *m; |