Commit 2f826f55 authored by Luciano Coelho's avatar Luciano Coelho Committed by John W. Linville

wl1271: wait for disconnect command complete event

Wait for the DISCONNECT_EVENT_COMPLETE_ID event after sending a disconnect
command.
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 99d84c1d
/* /*
* This file is part of wl1271 * This file is part of wl1271
* *
* Copyright (C) 2008-2009 Nokia Corporation * Copyright (C) 2008-2010 Nokia Corporation
* *
* Contact: Luciano Coelho <luciano.coelho@nokia.com> * Contact: Luciano Coelho <luciano.coelho@nokia.com>
* *
...@@ -411,7 +411,8 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl) ...@@ -411,7 +411,8 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl)
wl->event_mask = BSS_LOSE_EVENT_ID | wl->event_mask = BSS_LOSE_EVENT_ID |
SCAN_COMPLETE_EVENT_ID | SCAN_COMPLETE_EVENT_ID |
PS_REPORT_EVENT_ID | PS_REPORT_EVENT_ID |
JOIN_EVENT_COMPLETE_ID; JOIN_EVENT_COMPLETE_ID |
DISCONNECT_EVENT_COMPLETE_ID;
ret = wl1271_event_unmask(wl); ret = wl1271_event_unmask(wl);
if (ret < 0) { if (ret < 0) {
......
/* /*
* This file is part of wl1271 * This file is part of wl1271
* *
* Copyright (C) 2009 Nokia Corporation * Copyright (C) 2009-2010 Nokia Corporation
* *
* Contact: Luciano Coelho <luciano.coelho@nokia.com> * Contact: Luciano Coelho <luciano.coelho@nokia.com>
* *
...@@ -942,6 +942,10 @@ int wl1271_cmd_disconnect(struct wl1271 *wl) ...@@ -942,6 +942,10 @@ int wl1271_cmd_disconnect(struct wl1271 *wl)
goto out_free; goto out_free;
} }
ret = wl1271_cmd_wait_for_event(wl, DISCONNECT_EVENT_COMPLETE_ID);
if (ret < 0)
wl1271_error("cmd disconnect event completion error");
out_free: out_free:
kfree(cmd); kfree(cmd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment