]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Interworking: Continue ANQP fetch after TX failure
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 7 Jan 2013 16:38:09 +0000 (18:38 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 7 Jan 2013 16:38:09 +0000 (18:38 +0200)
If the driver rejected any of the offchannel Action frame TX requests,
the previous implementation terminated ANQP fetch process. While the
driver should not really reject the request normally, it is possible
that a request gets rejected for some reason. Allow the fetch process to
continue with the next AP in such case to avoid breaking networking
selection. This could result, e.g., in auto_interworking=1 process
failing to connect if any the driver rejects requests to any of the APs
in the scan result even if some other APs provided suitable information.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

wpa_supplicant/interworking.c

index d26ca42b2c609b6dcf8a919f4a88771853a3a669..019b8947c9b6815cd2b2e7896dc4682a9f484cdc 100644 (file)
@@ -13,6 +13,7 @@
 #include "common/gas.h"
 #include "common/wpa_ctrl.h"
 #include "utils/pcsc_funcs.h"
+#include "utils/eloop.h"
 #include "drivers/driver.h"
 #include "eap_common/eap_defs.h"
 #include "eap_peer/eap.h"
@@ -170,6 +171,13 @@ static int additional_roaming_consortiums(struct wpa_bss *bss)
 }
 
 
+static void interworking_continue_anqp(void *eloop_ctx, void *sock_ctx)
+{
+       struct wpa_supplicant *wpa_s = eloop_ctx;
+       interworking_next_anqp_fetch(wpa_s);
+}
+
+
 static int interworking_anqp_send_req(struct wpa_supplicant *wpa_s,
                                      struct wpa_bss *bss)
 {
@@ -238,6 +246,8 @@ static int interworking_anqp_send_req(struct wpa_supplicant *wpa_s,
        if (res < 0) {
                wpa_printf(MSG_DEBUG, "ANQP: Failed to send Query Request");
                ret = -1;
+               eloop_register_timeout(0, 0, interworking_continue_anqp, wpa_s,
+                                      NULL);
        } else
                wpa_printf(MSG_DEBUG, "ANQP: Query started with dialog token "
                           "%u", res);