mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-23 06:02:37 +01:00
wiphy: add wiphy_radio_work_is_running
This provides a way to know if a work item is actually running vs only been queued and waiting to run.
This commit is contained in:
parent
9e412f9fdd
commit
1c0b001b53
10
src/wiphy.c
10
src/wiphy.c
@ -1615,6 +1615,16 @@ void wiphy_radio_work_done(struct wiphy *wiphy, uint32_t id)
|
|||||||
wiphy_radio_work_next(wiphy);
|
wiphy_radio_work_next(wiphy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wiphy_radio_work_is_running(struct wiphy *wiphy, uint32_t id)
|
||||||
|
{
|
||||||
|
struct wiphy_radio_work_item *item = l_queue_peek_head(wiphy->work);
|
||||||
|
|
||||||
|
if (!item)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return item->id == id;
|
||||||
|
}
|
||||||
|
|
||||||
static int wiphy_init(void)
|
static int wiphy_init(void)
|
||||||
{
|
{
|
||||||
struct l_genl *genl = iwd_get_genl();
|
struct l_genl *genl = iwd_get_genl();
|
||||||
|
@ -116,3 +116,4 @@ uint32_t wiphy_radio_work_insert(struct wiphy *wiphy,
|
|||||||
int priority,
|
int priority,
|
||||||
const struct wiphy_radio_work_item_ops *ops);
|
const struct wiphy_radio_work_item_ops *ops);
|
||||||
void wiphy_radio_work_done(struct wiphy *wiphy, uint32_t id);
|
void wiphy_radio_work_done(struct wiphy *wiphy, uint32_t id);
|
||||||
|
bool wiphy_radio_work_is_running(struct wiphy *wiphy, uint32_t id);
|
||||||
|
Loading…
Reference in New Issue
Block a user