From aa0d8f1283c2dd81b619b2693495c62dbbfe1c0f Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 3 Aug 2022 14:36:37 -0700 Subject: [PATCH] wiphy: add two regulatory domain state events Events to indicate when a regulatory domain wiphy dump has started and ended. This is important because certain actions such as scanning need to be delayed until the dump has finished. --- src/device.c | 2 ++ src/wiphy.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/device.c b/src/device.c index 02da2cdc..192866c3 100644 --- a/src/device.c +++ b/src/device.c @@ -276,6 +276,8 @@ static void device_wiphy_state_changed_event(struct wiphy *wiphy, switch (event) { case WIPHY_STATE_WATCH_EVENT_RFKILLED: + case WIPHY_STATE_WATCH_EVENT_REGDOM_STARTED: + case WIPHY_STATE_WATCH_EVENT_REGDOM_DONE: break; case WIPHY_STATE_WATCH_EVENT_POWERED: if (device->dbus_powered) diff --git a/src/wiphy.h b/src/wiphy.h index 9a3b96f9..070c8aea 100644 --- a/src/wiphy.h +++ b/src/wiphy.h @@ -56,6 +56,8 @@ enum { enum wiphy_state_watch_event { WIPHY_STATE_WATCH_EVENT_POWERED, WIPHY_STATE_WATCH_EVENT_RFKILLED, + WIPHY_STATE_WATCH_EVENT_REGDOM_STARTED, + WIPHY_STATE_WATCH_EVENT_REGDOM_DONE, }; typedef void (*wiphy_state_watch_func_t)(struct wiphy *wiphy,