ENUM MAC80211_SCAN_FLAGS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ enum mac80211_scan_flags(9) β€” the scan-mode mood ring πŸ’…

okay bestie, welcome to section 9 of the kernel API manual, where we meet enum mac80211_scan_flags β€” literally just the enum that tracks currently active scan mode. that's the whole vibe. it's giving "little enum, big responsibilities" ✨


✨ SYNOPSIS ✨

enum mac80211_scan_flags {
    SCAN_SW_SCANNING ,
    SCAN_HW_SCANNING ,
    SCAN_ONCHANNEL_SCANNING ,
    SCAN_COMPLETED ,
    SCAN_ABORTED ,
    SCAN_HW_CANCELLED ,
    SCAN_BEACON_WAIT ,
    SCAN_BEACON_DONE

};

no cap, that's the whole thing. eight constants, zero drama (okay, slight drama, they're scan states). let's get into them 🫢


πŸŽ€ Constants πŸŽ€

  • SCAN_SW_SCANNING β€” so we're currently mid-scan, but honestly we might as well be sitting on the operating channel. it's a software scan situation, we're just out here vibing on-channel-ish πŸ’«
  • SCAN_HW_SCANNING β€” the hardware is doing the scanning for us πŸ‘‘ which means we have no way to determine whether we're on the operating channel or not. not us being completely in the dark about our own location 😭 literally no idea, and that's fine, the hardware's got it
  • SCAN_ONCHANNEL_SCANNING β€” do a software scan on only the current operating channel. the whole point? this should not interrupt normal traffic. polite scanning, main character energy that doesn't step on anyone else's moment 🧚
  • SCAN_COMPLETED β€” set for our scan work function when the driver reported that the scan completed. good news era πŸŽ‰
  • SCAN_ABORTED β€” set for our scan work function when the driver reported a scan complete for an aborted scan. yeah. it "completed." we're choosing to be positive about it πŸ’€
  • SCAN_HW_CANCELLED β€” set for our scan work function when the scan is being cancelled. not the slay we wanted, but here we are πŸ™ˆ
  • SCAN_BEACON_WAIT β€” set whenever we're passive scanning because of radar / no-IR, and we could send a probe request after receiving a beacon. we're waiting, we're patient, we're radar-respectful 🌸
  • SCAN_BEACON_DONE β€” beacon received!! we can now send a probe request. the wait is over, bestie, go send it πŸ”₯

🌈 SEE ALSO 🌈

Kernel file ./net/mac80211/ieee80211_i.h enum, plus the whole friend group:

  • ieee80211_bss_corrupt_data_flags(9)
  • enum ieee80211_bss_valid_data_flags(9)
  • enum ieee80211_packet_rx_flags(9)
  • enum ieee80211_rx_flags(9)
  • struct ieee80211_if_ocb(9)
  • struct ieee80211_mesh_sync_ops(9)
  • struct mesh_table(9)
  • struct mesh_tx_cache(9)
  • enum ieee80211_sub_if_data_flags(9)
  • enum ieee80211_sdata_state_bits(9)
  • enum ieee80211_chanctx_mode(9)
  • enum ieee80211_chanctx_replace_state(9)
  • struct txq_info(9)
  • struct ieee80211_if_nan(9)
  • struct ieee80211_if_nan_data(9)
  • enum mac80211_scan_state(9)
  • ieee80211_parse_ch_switch_ie(9)
  • struct ieee80211_elems_parse_params(9)

like, the entire mac80211 polycule honestly 😭 go read them all, iykyk πŸ’œ


fr fr though: if you only remember one thing, remember that these flags describe scan state β€” some of them are set by the driver reporting things back, and a couple of them are about passive scanning and waiting on beacons. don't conflate them, bestie, they're each doing their own little job πŸŽ€

and that's the page!! πŸ¦‹ sign-off time: this lil beauty lives in ./net/mac80211, it's dated October 2026, and you can call it enum mac80211_scan_flags(9) anytime you need it. periodt πŸ’–β­

πŸ“¦ where this page comes from