3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-18 18:29:29 +01:00

scan: Drop notify callback's ifindex parameter

This is not used by any of the scan notify callback implementations and
for P2P we're going to need to scan on an interface without an ifindex
so without this the other changes should be mostly contained in scan.
This commit is contained in:
Andrew Zaborowski 2019-03-14 21:42:11 +01:00 committed by Denis Kenzior
parent 5e95e30e41
commit 2b544541bc
4 changed files with 8 additions and 13 deletions

View File

@ -138,7 +138,7 @@ static void scan_request_failed(struct scan_context *sc,
if (sr->trigger)
sr->trigger(err, sr->userdata);
else if (sr->callback)
sr->callback(sc->ifindex, err, NULL, sr->userdata);
sr->callback(err, NULL, sr->userdata);
scan_request_free(sr);
}
@ -1176,7 +1176,7 @@ static void scan_finished(struct scan_context *sc, uint32_t wiphy,
}
if (callback)
new_owner = callback(sc->ifindex, err, bss_list, userdata);
new_owner = callback(err, bss_list, userdata);
if (sr)
scan_request_free(sr);

View File

@ -33,8 +33,7 @@ enum scan_state {
typedef void (*scan_func_t)(struct l_genl_msg *msg, void *user_data);
typedef void (*scan_trigger_func_t)(int, void *);
typedef bool (*scan_notify_func_t)(uint32_t ifindex, int err,
struct l_queue *bss_list,
typedef bool (*scan_notify_func_t)(int err, struct l_queue *bss_list,
void *userdata);
typedef void (*scan_destroy_func_t)(void *userdata);
typedef void (*scan_freq_set_func_t)(uint32_t freq, void *userdata);

View File

@ -592,8 +592,7 @@ not_supported:
return NULL;
}
static bool new_scan_results(uint32_t ifindex, int err,
struct l_queue *bss_list, void *userdata)
static bool new_scan_results(int err, struct l_queue *bss_list, void *userdata)
{
struct station *station = userdata;
struct l_dbus *dbus = dbus_get_bus();
@ -1076,8 +1075,7 @@ static void station_roam_scan_triggered(int err, void *user_data)
*/
}
static bool station_roam_scan_notify(uint32_t ifindex, int err,
struct l_queue *bss_list,
static bool station_roam_scan_notify(int err, struct l_queue *bss_list,
void *userdata)
{
struct station *station = userdata;
@ -1808,7 +1806,7 @@ static void station_hidden_network_scan_triggered(int err, void *user_data)
dbus_error_failed(station->connect_pending));
}
static bool station_hidden_network_scan_results(uint32_t ifindex, int err,
static bool station_hidden_network_scan_results(int err,
struct l_queue *bss_list,
void *userdata)
{

View File

@ -560,8 +560,7 @@ static void pin_timeout(struct l_timeout *timeout, void *user_data)
wsc_error_time_expired(wsc->pending));
}
static bool push_button_scan_results(uint32_t ifindex, int err,
struct l_queue *bss_list,
static bool push_button_scan_results(int err, struct l_queue *bss_list,
void *userdata)
{
struct wsc *wsc = userdata;
@ -718,8 +717,7 @@ static bool authorized_macs_contains(const uint8_t *authorized_macs,
return false;
}
static bool pin_scan_results(uint32_t ifindex, int err,
struct l_queue *bss_list, void *userdata)
static bool pin_scan_results(int err, struct l_queue *bss_list, void *userdata)
{
static const uint8_t wildcard_address[] =
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };