ieee80211_pa...ch_switch_ie(9)
π 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β thesdataof 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms