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

offchannel: add priority to start call

This will let the caller specify their own priority.
This commit is contained in:
James Prestwood 2022-09-21 15:31:47 -07:00 committed by Denis Kenzior
parent 7d97869c1f
commit 81ee935a48
3 changed files with 8 additions and 8 deletions

View File

@ -1622,6 +1622,7 @@ static void dpp_start_offchannel(struct dpp_sm *dpp, uint32_t freq)
* called). * called).
*/ */
uint32_t id = offchannel_start(netdev_get_wdev_id(dpp->netdev), uint32_t id = offchannel_start(netdev_get_wdev_id(dpp->netdev),
WIPHY_WORK_PRIORITY_OFFCHANNEL,
freq, dpp->dwell, dpp_roc_started, freq, dpp->dwell, dpp_roc_started,
dpp, dpp_presence_timeout); dpp, dpp_presence_timeout);

View File

@ -150,9 +150,9 @@ static const struct wiphy_radio_work_item_ops offchannel_work_ops = {
.destroy = offchannel_work_destroy, .destroy = offchannel_work_destroy,
}; };
uint32_t offchannel_start(uint64_t wdev_id, uint32_t freq, uint32_t duration, uint32_t offchannel_start(uint64_t wdev_id, int priority, uint32_t freq,
offchannel_started_cb_t started, void *user_data, uint32_t duration, offchannel_started_cb_t started,
offchannel_destroy_cb_t destroy) void *user_data, offchannel_destroy_cb_t destroy)
{ {
struct offchannel_info *info = l_new(struct offchannel_info, 1); struct offchannel_info *info = l_new(struct offchannel_info, 1);
@ -169,8 +169,7 @@ uint32_t offchannel_start(uint64_t wdev_id, uint32_t freq, uint32_t duration,
info->error = -ECANCELED; info->error = -ECANCELED;
return wiphy_radio_work_insert(wiphy_find_by_wdev(wdev_id), &info->work, return wiphy_radio_work_insert(wiphy_find_by_wdev(wdev_id), &info->work,
WIPHY_WORK_PRIORITY_OFFCHANNEL, priority, &offchannel_work_ops);
&offchannel_work_ops);
} }
void offchannel_cancel(uint64_t wdev_id, uint32_t id) void offchannel_cancel(uint64_t wdev_id, uint32_t id)

View File

@ -23,7 +23,7 @@
typedef void (*offchannel_started_cb_t)(void *user_data); typedef void (*offchannel_started_cb_t)(void *user_data);
typedef void (*offchannel_destroy_cb_t)(int error, void *user_data); typedef void (*offchannel_destroy_cb_t)(int error, void *user_data);
uint32_t offchannel_start(uint64_t wdev_id, uint32_t freq, uint32_t duration, uint32_t offchannel_start(uint64_t wdev_id, int priority, uint32_t freq,
offchannel_started_cb_t started, void *user_data, uint32_t duration, offchannel_started_cb_t started,
offchannel_destroy_cb_t destroy); void *user_data, offchannel_destroy_cb_t destroy);
void offchannel_cancel(uint64_t wdev_id, uint32_t id); void offchannel_cancel(uint64_t wdev_id, uint32_t id);