commit 395d8b9ea0a16d6fbf53118c570cd1b03d5652bf
parent e4a5972b424b33e368821356a12ef7c21e520d87
Author: Tim Kourt <tim.a.kourt@linux.intel.com>
Date: Fri, 22 Mar 2019 14:17:41 -0700
station: Refactor station_scan_destroy closer to its usage
The function is also renamed to reflect its usage
Diffstat:
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/station.c b/src/station.c
@@ -640,13 +640,6 @@ static void periodic_scan_stop(struct station *station)
}
}
-static void station_scan_destroy(void *userdata)
-{
- struct station *station = userdata;
-
- station->scan_id = 0;
-}
-
static bool station_needs_hidden_network_scan(struct station *station)
{
return !l_queue_isempty(station->hidden_bss_list_sorted) &&
@@ -2174,6 +2167,13 @@ static void station_dbus_scan_triggered(int err, void *user_data)
IWD_STATION_INTERFACE, "Scanning");
}
+static void station_dbus_scan_destroy(void *userdata)
+{
+ struct station *station = userdata;
+
+ station->scan_id = 0;
+}
+
static struct l_dbus_message *station_dbus_scan(struct l_dbus *dbus,
struct l_dbus_message *message,
void *user_data)
@@ -2188,7 +2188,7 @@ static struct l_dbus_message *station_dbus_scan(struct l_dbus *dbus,
station->scan_id = station_scan_trigger(station, NULL,
station_dbus_scan_triggered,
new_scan_results,
- station_scan_destroy);
+ station_dbus_scan_destroy);
if (!station->scan_id)
return dbus_error_failed(message);