aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-11-24 17:57:43 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-24 19:20:14 (GMT)
commitf88f19b46599c3b1a53b0bc1cf804248a4a3a7f7 (patch)
treefd67b8d4f9ab80748de299a05b94295a05fa531d /wpa_supplicant/events.c
parent202dec2a94695a696236ee5a2ad1be0905ccea14 (diff)
downloadhostap-f88f19b46599c3b1a53b0bc1cf804248a4a3a7f7.zip
hostap-f88f19b46599c3b1a53b0bc1cf804248a4a3a7f7.tar.gz
hostap-f88f19b46599c3b1a53b0bc1cf804248a4a3a7f7.tar.bz2
Use wpa_radio data for scan result updates
This replaces the now unnecessary iteration of get_radio_name() calls. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 7452e3e..571a3f6 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1393,7 +1393,6 @@ static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
union wpa_event_data *data)
{
- const char *rn, *rn2;
struct wpa_supplicant *ifs;
if (_wpa_supplicant_event_scan_results(wpa_s, data, 1) != 0) {
@@ -1408,25 +1407,12 @@ static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
}
/*
- * Check other interfaces to see if they have the same radio-name. If
+ * Check other interfaces to see if they share the same radio. If
* so, they get updated with this same scan info.
*/
- if (!wpa_s->driver->get_radio_name)
- return;
-
- rn = wpa_s->driver->get_radio_name(wpa_s->drv_priv);
- if (rn == NULL || rn[0] == '\0')
- return;
-
- wpa_dbg(wpa_s, MSG_DEBUG, "Checking for other virtual interfaces "
- "sharing same radio (%s) in event_scan_results", rn);
-
- for (ifs = wpa_s->global->ifaces; ifs; ifs = ifs->next) {
- if (ifs == wpa_s || !ifs->driver->get_radio_name)
- continue;
-
- rn2 = ifs->driver->get_radio_name(ifs->drv_priv);
- if (rn2 && os_strcmp(rn, rn2) == 0) {
+ dl_list_for_each(ifs, &wpa_s->radio->ifaces, struct wpa_supplicant,
+ radio_list) {
+ if (ifs != wpa_s) {
wpa_printf(MSG_DEBUG, "%s: Updating scan results from "
"sibling", ifs->ifname);
_wpa_supplicant_event_scan_results(ifs, data, 0);