mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-12 15:09:23 +01:00
station: Refactor station_scan_destroy closer to its usage
The function is also renamed to reflect its usage
This commit is contained in:
parent
e4a5972b42
commit
395d8b9ea0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user