diff mbox series

[v2,4/8] wiphy: don't parse dumps from unregistered wiphy's

Message ID 20221216172606.1799396-4-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [v2,1/8] band: introduce new method of tracking frequencies | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood Dec. 16, 2022, 5:26 p.m. UTC
There is no reason to parse these since IWD won't use them.
---
 src/wiphy.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/src/wiphy.c b/src/wiphy.c
index 3777bd58..f3a2a039 100644
--- a/src/wiphy.c
+++ b/src/wiphy.c
@@ -2015,6 +2015,10 @@  static void wiphy_dump_callback(struct l_genl_msg *msg,
 	if (L_WARN_ON(!wiphy))
 		return;
 
+	/* Unregistered means the wiphy is blacklisted, don't bother parsing */
+	if (!wiphy->registered)
+		return;
+
 	while (l_genl_attr_next(&bands, &type, NULL, NULL)) {
 		switch (type) {
 		case NL80211_BAND_2GHZ: