ieee80211_pa...ch_switch_ie(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

ok so this is ieee80211_parse_ch_switch_ie from the Kernel API Manual β€” and bestie, it parses channel switch IEs. that's literally the whole vibe. it takes your channel-switch information elements and reads them so the rest of the kernel knows what's up. slay.


✨ SYNOPSIS ✨

int ieee80211_parse_ch_switch_ie (struct ieee80211_sub_if_data *sdata ,
struct ieee802_11_elems *elems , enum nl80211_band current_band , u32
vht_cap_info , struct ieee80211_conn_settings *conn , u8 *bssid , bool
unprot_action , struct ieee80211_csa_ie *csa_ie );

like, that's the signature. copy it exactly, don't @ me 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • sdata β€” the sdata of the interface that received the frame. it's giving "who got the mail" energy πŸ’Œ
  • elems β€” the parsed 802.11 elements that came in with the frame. already parsed, so you're not doing that work again ✨
  • current_band β€” tells you the current band. like, where we at rn 🌈
  • vht_cap_info β€” the VHT capabilities of the transmitter. the sender's little resumΓ© of what it can do πŸ’…
  • conn β€” contains info about your own capabilities and restrictions, so the function can decide which channel switch announcements can actually be accepted. main character energy β€” it's about you, not the sender πŸ‘‘
  • bssid β€” the currently connected bssid (for reporting). iykyk πŸ“
  • unprot_action β€” whether the frame was an unprotected frame or not, used for reporting. yes, it matters, no, don't skip it πŸ™ˆ
  • csa_ie β€” the parsed 802.11 csa elements on count, mode, chandef and mesh ttl. all of them get filled in only if it succeeds β€” so if it fails, don't go reading that struct, bestie, it's not gonna be cute πŸ’€

🌟 RETURN 🌟

  • 0 β€” success, we ate πŸ“
  • <0 β€” error, something went wrong 😭
  • >0 β€” there is nothing to parse. not an error, just... nothing. lowkey iconic that it gets its own positivity tier ✨

πŸ”₯ SEE ALSO πŸ”₯

the kernel file ./net/mac80211/ieee80211_i.h plus this whole friend group:

  • enum 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_flags(9)
  • enum mac80211_scan_state(9)
  • struct ieee80211_elems_parse_params(9)

ok that's the whole page, no notes πŸ’– go parse those channel switch IEs, bestie.

mwah πŸ’‹ this little gem lives in ./net/mac80211, dated October 2026 β€” same page name, same energy, see u next time πŸ¦‹

πŸ“¦ where this page comes from