wl1271: wait for join command complete event

Poll for join command completion instead of waiting blindly for 10 msecs.
There is a timeout of 100 msecs, if the command doesn't complete by then, we
return an error code.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Luciano Coelho
2010-03-26 12:53:20 +02:00
committed by John W. Linville
parent 9560134ff9
commit 99d84c1de8
3 changed files with 36 additions and 6 deletions

View File

@@ -410,7 +410,8 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl)
/* unmask required mbox events */
wl->event_mask = BSS_LOSE_EVENT_ID |
SCAN_COMPLETE_EVENT_ID |
PS_REPORT_EVENT_ID;
PS_REPORT_EVENT_ID |
JOIN_EVENT_COMPLETE_ID;
ret = wl1271_event_unmask(wl);
if (ret < 0) {