aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/hs20_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-12-13 02:39:00 (GMT)
committerJouni Malinen <j@w1.fi>2014-02-25 23:24:24 (GMT)
commita6739e191ea46fd0646411c6b390da9fc3d1d6f4 (patch)
tree05d04856e80f6119b4204801137d2164348a0bfd /wpa_supplicant/hs20_supplicant.c
parentcf6d08a63f095b1fe19ba8ca71072b7cffd738ff (diff)
downloadhostap-a6739e191ea46fd0646411c6b390da9fc3d1d6f4.zip
hostap-a6739e191ea46fd0646411c6b390da9fc3d1d6f4.tar.gz
hostap-a6739e191ea46fd0646411c6b390da9fc3d1d6f4.tar.bz2
HS 2.0R2: Try to scan multiple times for OSU providers
Scan operation is not that reliable, so try couple of times if no OSU provider matches are found during fetch_osu command. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/hs20_supplicant.c')
-rw-r--r--wpa_supplicant/hs20_supplicant.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/wpa_supplicant/hs20_supplicant.c b/wpa_supplicant/hs20_supplicant.c
index 2cacb42..b873c7c 100644
--- a/wpa_supplicant/hs20_supplicant.c
+++ b/wpa_supplicant/hs20_supplicant.c
@@ -385,6 +385,7 @@ void hs20_parse_rx_hs20_anqp_resp(struct wpa_supplicant *wpa_s,
case HS20_STYPE_OSU_PROVIDERS_LIST:
wpa_msg(wpa_s, MSG_INFO, "RX-HS20-ANQP " MACSTR
" OSU Providers list", MAC2STR(sa));
+ wpa_s->num_prov_found++;
if (anqp) {
wpabuf_free(anqp->hs20_osu_providers_list);
anqp->hs20_osu_providers_list =
@@ -821,11 +822,20 @@ int hs20_fetch_osu(struct wpa_supplicant *wpa_s)
}
wpa_msg(wpa_s, MSG_INFO, "Starting OSU provisioning information fetch");
+ wpa_s->num_osu_scans = 0;
+ wpa_s->num_prov_found = 0;
+ hs20_start_osu_scan(wpa_s);
+
+ return 0;
+}
+
+
+void hs20_start_osu_scan(struct wpa_supplicant *wpa_s)
+{
+ wpa_s->num_osu_scans++;
wpa_s->scan_req = MANUAL_SCAN_REQ;
wpa_s->scan_res_handler = hs20_osu_scan_res_handler;
wpa_supplicant_req_scan(wpa_s, 0, 0);
-
- return 0;
}