From 6e5d1a540c12ab606627787b9a62d1129df9f9d4 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Tue, 11 Jan 2022 09:45:09 -0800 Subject: [PATCH] wiphy: define work priorities in one place Work priority was never explicitly defined anywhere, and a module using wiphy_radio_work APIs needed to ensure it was not inserting at a priority that would interfere with other work. Now all the types of work have been defined with their own priority and future priorities can easily be added before, after, or in between existing priorities. --- src/wiphy.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wiphy.h b/src/wiphy.h index 592eba70..fee5d41f 100644 --- a/src/wiphy.h +++ b/src/wiphy.h @@ -45,6 +45,12 @@ struct wiphy_radio_work_item { const struct wiphy_radio_work_item_ops *ops; }; +#define WIPHY_WORK_PRIORITY_FRAME 0 +#define WIPHY_WORK_PRIORITY_OFFCHANNEL 0 +#define WIPHY_WORK_PRIORITY_CONNECT 1 +#define WIPHY_WORK_PRIORITY_SCAN 2 +#define WIPHY_WORK_PRIORITY_PERIODIC_SCAN 3 + enum wiphy_state_watch_event { WIPHY_STATE_WATCH_EVENT_POWERED, WIPHY_STATE_WATCH_EVENT_RFKILLED,