Skip to contentSkip to conversation

scan: remove early supported check for 6ghz in wiphy watch

PATCH Applied James Prestwood 2 participants 2 messages Dec 12, 2022 – Dec 13, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scan: remove early supported check for 6ghz in wiphy watch

If the regdom updates during a periodic scan the results will be delayed until after the update in order to, potentially, add 6GHz frequencies since they may become available. The delayed results happen regardless of 6GHz support but scan_wiphy_watch() was returning early if 6GHz was not supported causing the scan request to never complete.

---
 src/scan.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
src/scan.c +2 -5
index 5d2f2957..f63b3ed2 100644
@@ -1933,12 +1933,9 @@ static void scan_wiphy_watch(struct wiphy *wiphy,
 	struct scan_freq_set *freqs_6ghz;
 	struct scan_freq_set *allowed;
 	bool allow_6g;
-	const struct scan_freq_set *supported =
-					wiphy_get_supported_freqs(wiphy);
 
-	/* Only care about regulatory events, and if 6GHz capable */
-	if (event != WIPHY_STATE_WATCH_EVENT_REGDOM_DONE ||
-			!(scan_freq_set_get_bands(supported) & BAND_FREQ_6_GHZ))
+	/* Only care about completed regulatory dumps */
+	if (event != WIPHY_STATE_WATCH_EVENT_REGDOM_DONE)
 		return;
 
 	if (!sc->sp.id)
Signature · 1 line
2.34.3
#1 lore raw

Hi James,

Quoted 10 lines · James Prestwood

If the regdom updates during a periodic scan the results will be delayed until after the update in order to, potentially, add 6GHz frequencies since they may become available. The delayed results happen regardless of 6GHz support but scan_wiphy_watch() was returning early if 6GHz was not supported causing the scan request to never complete.

---
  src/scan.c | 7 ++-----
  1 file changed, 2 insertions(+), 5 deletions(-)

Applied, thanks.

Regards,
-Denis