]> git.karo-electronics.de Git - linux-beck.git/commitdiff
wl1271: wait for disconnect command complete event
authorLuciano Coelho <luciano.coelho@nokia.com>
Fri, 26 Mar 2010 10:53:21 +0000 (12:53 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 31 Mar 2010 18:39:14 +0000 (14:39 -0400)
Wait for the DISCONNECT_EVENT_COMPLETE_ID event after sending a disconnect
command.

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>
drivers/net/wireless/wl12xx/wl1271_boot.c
drivers/net/wireless/wl12xx/wl1271_cmd.c

index 2c7e5612d5ba882b9c0499b24426d41055b702e0..7acef88df1fea07b8ef06d42ad8f49e090cedfc6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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>
  *
@@ -411,7 +411,8 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl)
        wl->event_mask = BSS_LOSE_EVENT_ID |
                SCAN_COMPLETE_EVENT_ID |
                PS_REPORT_EVENT_ID |
-               JOIN_EVENT_COMPLETE_ID;
+               JOIN_EVENT_COMPLETE_ID |
+               DISCONNECT_EVENT_COMPLETE_ID;
 
        ret = wl1271_event_unmask(wl);
        if (ret < 0) {
index e677f979ca6ba652a81b48ed97b5df865b72d4cb..0aa2422982d3128d0ea588c389e8085c73f10c0a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of wl1271
  *
- * Copyright (C) 2009 Nokia Corporation
+ * Copyright (C) 2009-2010 Nokia Corporation
  *
  * Contact: Luciano Coelho <luciano.coelho@nokia.com>
  *
@@ -942,6 +942,10 @@ int wl1271_cmd_disconnect(struct wl1271 *wl)
                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:
        kfree(cmd);