aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-11-24 18:03:40 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-24 19:20:14 (GMT)
commit1b544ffa742f00fe2ed3bb73e4b31de72f800735 (patch)
tree742ec3be87c9690c11c49a479c299ef819f11eca
parent5b81927d5851803e6d7c320ab120feb9be805517 (diff)
downloadhostap-1b544ffa742f00fe2ed3bb73e4b31de72f800735.zip
hostap-1b544ffa742f00fe2ed3bb73e4b31de72f800735.tar.gz
hostap-1b544ffa742f00fe2ed3bb73e4b31de72f800735.tar.bz2
Use wpa_radio data for wpas_wpa_is_in_progress()
This replaces the now unnecessary iteration of get_radio_name() calls. Signed-hostap: Jouni Malinen <j@w1.fi>
-rw-r--r--wpa_supplicant/wpa_supplicant.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 354a00e..f7f2fa2 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -4100,32 +4100,13 @@ static int wpas_conn_in_progress(struct wpa_supplicant *wpa_s)
*/
int wpas_wpa_is_in_progress(struct wpa_supplicant *wpa_s, int include_current)
{
- const char *rn, *rn2;
struct wpa_supplicant *ifs;
- if (!wpa_s->driver->get_radio_name) {
- if (include_current && wpas_conn_in_progress(wpa_s)) {
- wpa_dbg(wpa_s, MSG_DEBUG, "Connection is in progress on interface %s - defer",
- wpa_s->ifname);
- return 1;
- }
-
- return 0;
- }
-
- rn = wpa_s->driver->get_radio_name(wpa_s->drv_priv);
- if (rn == NULL || rn[0] == '\0')
- return 0;
-
- for (ifs = wpa_s->global->ifaces; ifs; ifs = ifs->next) {
+ dl_list_for_each(ifs, &wpa_s->radio->ifaces, struct wpa_supplicant,
+ radio_list) {
if (!include_current && ifs == wpa_s)
continue;
- if (!ifs->driver->get_radio_name)
- continue;
- rn2 = ifs->driver->get_radio_name(ifs->drv_priv);
- if (!rn2 || os_strcmp(rn, rn2) != 0)
- continue;
if (wpas_conn_in_progress(ifs)) {
wpa_dbg(wpa_s, MSG_DEBUG, "Connection is in progress "
"on interface %s - defer", ifs->ifname);