From 3a87b6c51893be950fc544c0eafc260e4109e34f Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Fri, 16 Dec 2022 13:27:37 -0800 Subject: [PATCH] wiphy: don't parse dumps from unregistered wiphy's There is no reason to parse these since IWD won't use them. --- src/wiphy.c | 4 ++++ 1 file changed, 4 insertions(+) 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: