mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 23:09:34 +01:00
scan: set scan priority via scan_common
This adds a priority argument to scan_common rather than hard coding it when inserting the work item and uses the newly defined wiphy priority for scanning.
This commit is contained in:
parent
6e5d1a540c
commit
c7a6730d28
19
src/scan.c
19
src/scan.c
@ -608,6 +608,7 @@ static struct scan_request *scan_request_new(struct scan_context *sc,
|
|||||||
|
|
||||||
static uint32_t scan_common(uint64_t wdev_id, bool passive,
|
static uint32_t scan_common(uint64_t wdev_id, bool passive,
|
||||||
const struct scan_parameters *params,
|
const struct scan_parameters *params,
|
||||||
|
int priority,
|
||||||
scan_trigger_func_t trigger,
|
scan_trigger_func_t trigger,
|
||||||
scan_notify_func_t notify, void *userdata,
|
scan_notify_func_t notify, void *userdata,
|
||||||
scan_destroy_func_t destroy)
|
scan_destroy_func_t destroy)
|
||||||
@ -626,7 +627,8 @@ static uint32_t scan_common(uint64_t wdev_id, bool passive,
|
|||||||
|
|
||||||
l_queue_push_tail(sc->requests, sr);
|
l_queue_push_tail(sc->requests, sr);
|
||||||
|
|
||||||
return wiphy_radio_work_insert(sc->wiphy, &sr->work, 2, &work_ops);
|
return wiphy_radio_work_insert(sc->wiphy, &sr->work,
|
||||||
|
priority, &work_ops);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t scan_passive(uint64_t wdev_id, struct scan_freq_set *freqs,
|
uint32_t scan_passive(uint64_t wdev_id, struct scan_freq_set *freqs,
|
||||||
@ -635,8 +637,8 @@ uint32_t scan_passive(uint64_t wdev_id, struct scan_freq_set *freqs,
|
|||||||
{
|
{
|
||||||
struct scan_parameters params = { .freqs = freqs };
|
struct scan_parameters params = { .freqs = freqs };
|
||||||
|
|
||||||
return scan_common(wdev_id, true, ¶ms, trigger, notify,
|
return scan_common(wdev_id, true, ¶ms, WIPHY_WORK_PRIORITY_SCAN,
|
||||||
userdata, destroy);
|
trigger, notify, userdata, destroy);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t scan_passive_full(uint64_t wdev_id,
|
uint32_t scan_passive_full(uint64_t wdev_id,
|
||||||
@ -645,8 +647,8 @@ uint32_t scan_passive_full(uint64_t wdev_id,
|
|||||||
scan_notify_func_t notify, void *userdata,
|
scan_notify_func_t notify, void *userdata,
|
||||||
scan_destroy_func_t destroy)
|
scan_destroy_func_t destroy)
|
||||||
{
|
{
|
||||||
return scan_common(wdev_id, true, params, trigger,
|
return scan_common(wdev_id, true, params, WIPHY_WORK_PRIORITY_SCAN,
|
||||||
notify, userdata, destroy);
|
trigger, notify, userdata, destroy);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t scan_active(uint64_t wdev_id, uint8_t *extra_ie, size_t extra_ie_size,
|
uint32_t scan_active(uint64_t wdev_id, uint8_t *extra_ie, size_t extra_ie_size,
|
||||||
@ -659,7 +661,7 @@ uint32_t scan_active(uint64_t wdev_id, uint8_t *extra_ie, size_t extra_ie_size,
|
|||||||
params.extra_ie = extra_ie;
|
params.extra_ie = extra_ie;
|
||||||
params.extra_ie_size = extra_ie_size;
|
params.extra_ie_size = extra_ie_size;
|
||||||
|
|
||||||
return scan_common(wdev_id, false, ¶ms,
|
return scan_common(wdev_id, false, ¶ms, WIPHY_WORK_PRIORITY_SCAN,
|
||||||
trigger, notify, userdata, destroy);
|
trigger, notify, userdata, destroy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -668,7 +670,7 @@ uint32_t scan_active_full(uint64_t wdev_id,
|
|||||||
scan_trigger_func_t trigger, scan_notify_func_t notify,
|
scan_trigger_func_t trigger, scan_notify_func_t notify,
|
||||||
void *userdata, scan_destroy_func_t destroy)
|
void *userdata, scan_destroy_func_t destroy)
|
||||||
{
|
{
|
||||||
return scan_common(wdev_id, false, params,
|
return scan_common(wdev_id, false, params, WIPHY_WORK_PRIORITY_SCAN,
|
||||||
trigger, notify, userdata, destroy);
|
trigger, notify, userdata, destroy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -796,7 +798,8 @@ uint32_t scan_owe_hidden(uint64_t wdev_id, struct l_queue *list,
|
|||||||
done:
|
done:
|
||||||
l_queue_push_tail(sc->requests, sr);
|
l_queue_push_tail(sc->requests, sr);
|
||||||
|
|
||||||
return wiphy_radio_work_insert(sc->wiphy, &sr->work, 2, &work_ops);
|
return wiphy_radio_work_insert(sc->wiphy, &sr->work,
|
||||||
|
WIPHY_WORK_PRIORITY_SCAN, &work_ops);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool scan_cancel(uint64_t wdev_id, uint32_t id)
|
bool scan_cancel(uint64_t wdev_id, uint32_t id)
|
||||||
|
Loading…
Reference in New Issue
Block a user