From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH v3 3/7] wiphy: add wiphy_regdom_is_updating
Date: Thu, 4 Aug 2022 11:51:08 -0700 [thread overview]
Message-ID: <20220804185112.457670-3-prestwoj@gmail.com> (raw)
In-Reply-To: <20220804185112.457670-1-prestwoj@gmail.com>
This allows a module to check the current status of the regdom
in case it misses the wiphy event (e.g. registers after the
STARTED event).
---
src/wiphy.c | 5 +++++
src/wiphy.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/src/wiphy.c b/src/wiphy.c
index dfdca989..3beb351c 100644
--- a/src/wiphy.c
+++ b/src/wiphy.c
@@ -921,6 +921,11 @@ int wiphy_estimate_data_rate(struct wiphy *wiphy,
out_data_rate);
}
+bool wiphy_regdom_is_updating(struct wiphy *wiphy)
+{
+ return wiphy->pending_freqs != NULL;
+}
+
uint32_t wiphy_state_watch_add(struct wiphy *wiphy,
wiphy_state_watch_func_t func,
void *user_data, wiphy_destroy_func_t destroy)
diff --git a/src/wiphy.h b/src/wiphy.h
index da2eca20..2159fc00 100644
--- a/src/wiphy.h
+++ b/src/wiphy.h
@@ -134,6 +134,7 @@ int wiphy_estimate_data_rate(struct wiphy *wiphy,
const void *ies, uint16_t ies_len,
const struct scan_bss *bss,
uint64_t *out_data_rate);
+bool wiphy_regdom_is_updating(struct wiphy *wiphy);
uint32_t wiphy_state_watch_add(struct wiphy *wiphy,
wiphy_state_watch_func_t func, void *user_data,
--
2.34.3
next prev parent reply other threads:[~2022-08-04 18:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-04 18:51 [PATCH v3 1/7] wiphy: track GET_REG ID James Prestwood
2022-08-04 18:51 ` [PATCH v3 2/7] wiphy: dump wiphy's on regulatory domain change James Prestwood
2022-08-04 18:51 ` James Prestwood [this message]
2022-08-04 18:51 ` [PATCH v3 4/7] station: do full passive scan if 6GHz is supported but disabled James Prestwood
2022-08-04 19:20 ` Denis Kenzior
2022-08-04 18:51 ` [PATCH v3 5/7] scan: split full scans by band to enable 6GHz James Prestwood
2022-08-04 18:51 ` [PATCH v3 6/7] scan: watch for regdom updates " James Prestwood
2022-08-04 18:51 ` [PATCH v3 7/7] wiphy: don't re-dump wiphy if the regdom didn't change James Prestwood
2022-08-04 19:18 ` [PATCH v3 1/7] wiphy: track GET_REG ID Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220804185112.457670-3-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox