public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* Clarification on the usage of NL80211_SCAN_FLAG_FLUSH
@ 2026-01-27 19:40 Matthew Schwartz
  2026-01-28  8:38 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Schwartz @ 2026-01-27 19:40 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg

Hello,

I had a quick question about the proper usage of NL80211_SCAN_FLAG_FLUSH. I'm looking into a bug while using iwd where rapidly switching between a 2.4GHz network and a 5GHz network can have spurious connection failures. After debugging the issue, it looks like iwd is flushing all BSS entries by using NL80211_SCAN_FLAG_FLUSH for both full scans and partial-channel scans (i.e. only 2.4GHz, only 5GHz), and if this happens during the network connection process it causes the failures.

The observed behavior is:

1. iwd issues a 2.4GHz-only quick scan with FLUSH
2. User initiates connection to a 5GHz BSS from a previous scan
3. Scan completes, kernel flushes all BSS entries
4. Connection fails because the target BSS is no longer in cache

Is this intended behavior of NL80211_SCAN_FLAG_FLUSH where it clears all BSS entries regardless of which channels were scanned, or should NL80211_SCAN_FLAG_FLUSH be limited to channels that were scanned in the request which triggered them? The uAPI definition for it is simply "flush cache before scanning", but this seems open to interpretation as to whether it means the entire cache or just the cache on scanned channels.

If this is working as designed then I will look at submitting a fix to iwd, but if limiting the flush during partial scans is a viable option I could look at fixing that on the kernel side.

Thanks,
Matt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-28  8:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-27 19:40 Clarification on the usage of NL80211_SCAN_FLAG_FLUSH Matthew Schwartz
2026-01-28  8:38 ` Johannes Berg
2026-01-28  8:53   ` Matthew Schwartz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox