nl80211_send_chandef(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nl80211_send_chandef πŸ’…

okay so bestie, welcome to nl80211_send_chandef(9) β€” yes that's the section 9, Kernel API Manual vibe, we're in the deep kernel end now 🫢. This little icon is literally the one that sends the channel definition, and honestly? she's doing the most with very little. let's get into it ✨


✨ NAME ✨

nl80211_send_chandef β€” sends the channel definition πŸ’–

like, that's her whole job. that's the assignment and she ate.


🌸 SYNOPSIS 🌸

int nl80211_send_chandef (struct sk_buff *msg , const struct
       cfg80211_chan_def *chandef );

so she takes two things and gives you back an int. no cap, that's it. look at her being all struct sk_buff *msg and const struct cfg80211_chan_def *chandef β€” main character energy fr fr πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • msg β€” the msg to send channel definition πŸ’Œ like this is the sk_buff she's gonna tuck the channel definition into. it's giving delivery service, it's giving "I got you bestie" πŸ¦‹
  • chandef β€” the channel definition to check πŸ‘€ yes she's const, yes she's a struct cfg80211_chan_def *, and yes she's the star of the show. this is the actual channel definition getting the vibe check 🌈

⭐ RETURN ⭐

  • 0 if sent the channel definition to msg β€” slay, success, we love a clean zero πŸ’…βœ¨
  • < 0 on error β€” not the vibe 😭 something went wrong, she's negative, we're in our flop era (derogatory)

lowkey important bestie: zero means it made it into msg, anything less than zero means nope, error, do not pass go πŸ™ˆ keep an eye on that return value iykyk

part 1 done, more coming β€” don't go anywhere πŸ§šπŸ’œ

✨ SEE ALSO ✨

okay so this section is literally the whole friend group πŸ’… β€” every single thing cfg80211 wants you to go read next. Grab a snack, bestie, because it's long. Ngl it's giving "the entire syllabus on one page" energy but every single one of these is a real cross-reference and we are NOT skipping any, periodt.

  • ./include/net/cfg80211.h β€” this is the kernel file where it all lives fr fr. Start here if you want the source-of-truth vibes.
  • Introduction(9) β€” the intro page, the little orientation tour 🫢
  • Device registration(9) β€” how you register a device, iconic behaviour

πŸ¦‹ the bands, channels & rates girlies

okay this whole cluster is about the radio side of things β€” channels, rates, HT/VHT/HE/EHT/UHR caps, and all that delicious capability data. If you're messing with what a band can, like, do, this is your squad ✨


πŸŽ€ Actions and configuration

this is the big one, bestie. chandef everywhere. channel definitions, TID configs, beacon data, AP settings, station params, SAR, mesh, OCB β€” it's giving main character energy and honestly it earned it πŸ‘‘


πŸ”₯ Scanning and BSS list handling

the "finding wifi and remembering it" era 🌸 scan requests, scheduled scans, BSS entries, auth/assoc/deauth/disassoc, IBSS, connect params, plus all the WoWLAN + coalesce + QoS goodies. Obsessed with how much is in here ngl.

  • Scanning and BSS list handling(9)
  • struct cfg80211_ssid(9)
  • struct cfg80211_scan_info(9)
  • struct cfg80211_scan_6ghz_params(9)
  • struct cfg80211_scan_request(9)
  • struct cfg80211_match_set(9)
  • struct cfg80211_sched_scan_plan(9)
  • struct cfg80211_bss_select_adjust(9)
  • struct cfg80211_sched_scan_request(9)
  • enum cfg80211_signal_type(9)
  • struct cfg80211_inform_bss(9)
  • struct cfg80211_bss_ies(9)
  • struct cfg80211_bss(9)
  • ieee80211_bss_get_elem(9)
  • ieee80211_bss_get_ie(9)
  • struct cfg80211_auth_request(9)
  • struct cfg80211_assoc_link(9)
  • struct cfg80211_ml_reconf_req(9)
  • enum cfg80211_assoc_req_flags(9)
  • struct cfg80211_assoc_request(9)
  • struct cfg80211_deauth_request(9)
  • struct cfg80211_disassoc_request(9)
  • struct cfg80211_ibss_params(9)
  • struct cfg80211_bss_selection(9)
  • struct cfg80211_connect_params(9)
  • enum cfg80211_connect_params_changed(9)
  • enum wiphy_params_flags(9)
  • struct cfg80211_pmksa(9)
  • struct cfg80211_pkt_pattern(9)
  • struct cfg80211_wowlan_tcp(9)
  • struct cfg80211_wowlan(9)
  • struct cfg80211_coalesce_rules(9)
  • struct cfg80211_coalesce(9)
  • struct cfg80211_wowlan_nd_match(9)
  • struct cfg80211_wowlan_nd_info(9)
  • struct cfg80211_wowlan_wakeup(9)
  • struct cfg80211_gtk_rekey_data(9)
  • struct cfg80211_update_ft_ies_params(9)
  • struct cfg80211_mgmt_tx_params(9)
  • struct cfg80211_dscp_exception(9)
  • struct cfg80211_dscp_range(9)
  • struct cfg80211_qos_map(9)

πŸ’œ Neighbor Awareness Networking (NAN) + the auth crew

NAN besties rise 🧚 β€” bands, channels, schedules, peer maps, filters, funcs. Then PMK, external auth, FTM responder stats, PMSR, OWE, and management frame regs. it's giving "so many moving parts" and honestly same.

  • Neighbor Awareness Networking (NAN)(9)
  • struct cfg80211_nan_band_config(9)
  • struct cfg80211_nan_conf(9)
  • struct cfg80211_nan_channel(9)
  • struct cfg80211_nan_local_sched(9)
  • struct cfg80211_nan_peer_map(9)
  • struct cfg80211_nan_peer_sched(9)
  • enum cfg80211_nan_conf_changes(9)
  • struct cfg80211_nan_func_filter(9)
  • struct cfg80211_nan_func(9)
  • struct cfg80211_pmk_conf(9)
  • struct cfg80211_external_auth_params(9)
  • struct cfg80211_ftm_responder_stats(9)
  • struct cfg80211_pmsr_ftm_result(9)
  • struct cfg80211_pmsr_result(9)
  • struct cfg80211_pmsr_ftm_request_peer(9)
  • struct cfg80211_pmsr_request_peer(9)
  • struct cfg80211_pmsr_request(9)
  • struct cfg80211_update_owe_info(9)
  • struct mgmt_frame_regs(9)

πŸ‘‘ the wiphy era (ops, flags, iface combos, radios)

the driver-side royalty πŸ’… β€” cfg80211_ops, wiphy flags, iface limits/combinations, WoWLAN support, coalesce support, vendor command flags, opmode, iftype ext capa, AKM suites, and the radio config stuff. This is where you live if you write drivers, iykyk.

  • struct cfg80211_ops(9)
  • enum wiphy_flags(9)
  • struct ieee80211_iface_limit(9)
  • struct ieee80211_iface_combination(9)
  • enum wiphy_wowlan_support_flags(9)
  • struct wiphy_wowlan_support(9)
  • struct wiphy_coalesce_support(9)
  • enum wiphy_vendor_command_flags(9)
  • enum wiphy_opmode_flag(9)
  • struct sta_opmode_info(9)
  • struct wiphy_vendor_command(9)
  • struct wiphy_iftype_ext_capab(9)
  • cfg80211_get_iftype_ext_capa(9)
  • struct cfg80211_pmsr_capabilities(9)
  • struct wiphy_iftype_akm_suites(9)
  • struct wiphy_radio_cfg(9)
  • struct wiphy_radio_freq_range(9)
  • struct wiphy_radio(9)
  • enum wiphy_nan_flags(9)
  • struct wiphy_nan_capa(9)
  • struct wiphy(9)

⭐ wiphy lifecycle, locks & work queues

creating, registering, locking, and the entire work-queue family (regular, delayed, hrtimer) β€” plus wireless_dev and wdev helpers. basically the "keep it alive and thread-safe" saga 😭


🌈 Utility functions

the little helpers that carry the whole operation 🫢 channel math, freq↔channel conversion, PSC checks, radio/chandef validation, response rates, radiotap iterator, and header length helpers. These ate, no cap.


πŸ“ Data path helpers

the "actually move the packets" section πŸš€ 802.11β†’802.3 conversion, A-MSDU checks and deaggregation, tunnel proto, mesh header stripping, 802.1d classification, and the entire element-finding family (cfg80211_find_ie* girlies stand up). Plus RNR iteration and defragmentation. Iconic.


🌸 Regulatory enforcement infrastructure

the "what am I even allowed to transmit on" department πŸ›‚ β€” hints, custom regd application, freq reg info, initiator names, pre-CAC checks, and the internal regdb WMM query. Very "rules are rules" of it.


🧚 scan/BSS notifications & MLME events

everything the driver yells at cfg80211 about πŸ“£ scan done, sched scan results/stopped, informing BSS, merging profiles, ref/put/unlink bss, MLME rx/tx, assoc resp, michael mic failure, ibss joined, new peer candidate. it's a whole group chat of events fr fr.


πŸ™ˆ RFkill integration

short but crucial β€” telling the world the hardware got switched off πŸ”Œ


πŸŽ€ Vendor commands

for when you need your own special little commands and events πŸ’– alloc reply skb, reply, get sender, event alloc (unicast too), and fire the event.


πŸ’€ Test mode

yep, still here, still iconic. reply skb, reply, event skb, event. πŸ§ͺ


πŸ”₯ connection/roam/disconnect notifications + everything else

the grand finale bestie 😭 connect done/bss/result/timeout, roam info & roamed, port authorized, disconnected, remain-on-channel, TID stats alloc/release, new/del sta, rx/tx mgmt paths, control port, CQM notifications (rssi, pktloss, txe, beacon loss), radar + CAC events, GTK rekey, pmksa candidate, spurious/unexpected frames, probe status, OBSS beacon reports, and the beaconing check config. We made it. Periodt. πŸ‘‘

…okay so the SEE ALSO situation is still going, and honestly? it's giving extended universe. every single one of these is a <cyan>(9)</cyan> kernel-doc page, spelled exactly like the manpage spells them, no edits, no merges β€” collect them all like they're limited-edition stickers: 🫢

real talk: that's the whole list, nothing skipped, nothing renamed. if a page up there is the one you actually needed, go read that one β€” this page is just the ✨connector✨. πŸ’…

and that's a wrap on the whole page, bestie!! πŸŽ€ source lives in ./include/net, it's from October 2026, and yes β€” it's still nl80211_send_chandef(9) in the corner, serving main-character energy right to the very last line. 🌈⭐ you read the whole thing, which lowkey makes you iconic. periodt. πŸ’–πŸ¦‹

πŸ“¦ where this page comes from