ieee80211_c..._to_freq_khz(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ieee80211_channel_to_freq_khz β€” NAME

okay so bestie, we're deep in the Kernel API Manual today and this little function is called ieee80211_channel_to_freq_khz β€” it's a convert channel number to frequency girlie. that's the whole job. that's the assignment. she takes a channel and hands you back the freq. iconic behaviour honestly.


✨ SYNOPSIS ✨

u32 ieee80211_channel_to_freq_khz (int chan , enum nl80211_band band );

look at her. u32 return type, two args, no drama. we love a signature that knows what it wants 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • chan β€” the channel number, babe. just the number. that's it. that's the input 🌸
  • band β€” the band. and yes you have to pass it, because β€” and this is the tea β€” channel number overlap is real. like, the same channel number can mean different things in different bands, so if you don't tell her which band you're in she can't do the math. necessary. required. no cap πŸ’…

πŸ”₯ RETURN πŸ”₯

she gives you back the corresponding frequency (in KHz) β€” capital K, lowercase Hz, KHz, keep it exactly like that β€” or 0 if the conversion failed. so like, zero is the "bestie that didn't work out" signal 😭 check for it. fr fr. don't just assume every number she hands you is a valid frequency, because 0 is a real possible answer and it means nope.

lowkey important: 0 is your failure flag here, so if you're out here treating every return value as a legit frequency you're gonna have a bad time πŸ’€

okay that's the shape of her β€” part 1 of 3, more incoming, stay tuned bestie πŸ¦‹

πŸŽ€ SEE ALSO πŸŽ€

okay so this is THE part, bestie. this is where the manpage stops explaining ieee80211_..._to_freq_khz(9) and just... dumps the entire extended family on you like a group chat with 400 unread messages πŸ’€. it's every single thing that lives next door in ./include/net/cfg80211.h and its friends, and yes, we're listing ALL of them, one (9) at a time, no skips, no cap.

buckle up, hydrate, and let's go πŸ’–

  • Kernel file ./include/net/cfg80211.h β€” the actual file all these cuties live in, iconic home base 🏠
  • Introduction(9)
  • Device registration(9)
  • enum ieee80211_channel_flags(9)
  • struct ieee80211_channel(9)
  • enum ieee80211_rate_flags(9)
  • enum ieee80211_bss_type(9)
  • enum ieee80211_privacy(9)
  • struct ieee80211_rate(9)
  • struct ieee80211_he_obss_pd(9)
  • struct cfg80211_he_bss_color(9)
  • struct ieee80211_sta_ht_cap(9)
  • struct ieee80211_sta_vht_cap(9)
  • struct ieee80211_sta_he_cap(9)
  • struct ieee80211_eht_mcs_nss_supp(9)
  • struct ieee80211_sta_eht_cap(9)
  • struct ieee80211_sta_uhr_cap(9)
  • struct ieee80211_sband_iftype_data(9)
  • enum ieee80211_edmg_bw_config(9)
  • struct ieee80211_edmg(9)
  • struct ieee80211_sta_s1g_cap(9)
  • struct ieee80211_supported_band(9)

that's the "which radios even exist" era of the list, and it's giving ✨ foundational ✨

notice how _ieee80211_set_sband_iftype_data has the little underscore and then ieee80211_set_sband_iftype_data doesn't? yes. that's a thing. both listed, both real, don't @ me 😭


okay next chunk is basically the entire personality of wifi: channels, widths, DFS, and every struct that wants to be a chan_def when it grows up πŸ¦‹

a whole chandef cinematic universe, we love to see it πŸ’…


  • enum survey_info_flags(9)
  • struct survey_info(9)
  • struct cfg80211_crypto_settings(9)
  • struct cfg80211_mbssid_config(9)
  • struct cfg80211_mbssid_elems(9)
  • struct cfg80211_rnr_elems(9)
  • struct cfg80211_beacon_data(9)
  • struct cfg80211_acl_data(9)
  • struct cfg80211_fils_discovery(9)
  • struct cfg80211_unsol_bcast_probe_resp(9)
  • struct cfg80211_s1g_short_beacon(9)
  • struct cfg80211_ap_settings(9)
  • struct cfg80211_ap_update(9)
  • struct cfg80211_csa_settings(9)
  • struct cfg80211_color_change_settings(9)
  • struct iface_combination_params(9)

the beacon-era structs! cfg80211_ap_settings is main character energy, honestly πŸ‘‘


and now: stations. stations, stations, so many stations πŸš‰

  • enum station_parameters_apply_mask(9)
  • struct sta_txpwr(9)
  • struct link_station_parameters(9)
  • struct link_station_del_parameters(9)
  • struct cfg80211_ttlm_params(9)
  • struct station_parameters(9)
  • struct station_del_parameters(9)
  • enum cfg80211_station_type(9)
  • cfg80211_check_station_change(9)
  • enum rate_info_flags(9)
  • enum rate_info_bw(9)
  • struct rate_info(9)
  • enum bss_param_flags(9)
  • struct sta_bss_parameters(9)
  • struct cfg80211_txq_stats(9)
  • struct cfg80211_tid_stats(9)
  • struct link_station_info(9)
  • struct station_info(9)
  • struct cfg80211_sar_sub_specs(9)
  • struct cfg80211_sar_specs(9)
  • struct cfg80211_sar_freq_ranges(9)
  • struct cfg80211_sar_capa(9)
  • cfg80211_get_station(9)
  • enum monitor_flags(9)
  • enum mpath_info_flags(9)
  • struct mpath_info(9)
  • enum wiphy_bss_param_flags(9)
  • struct bss_parameters(9)
  • struct mesh_config(9)
  • struct mesh_setup(9)
  • struct ocb_setup(9)
  • struct ieee80211_txq_params(9)

mesh and OCB cameos at the end there, we see you 🫢


🌸 Scanning and BSS list handling 🌸

scanning!! the part literally everyone asks about, and the list is long long. no skips, here we go:

  • 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)

connect / auth / assoc / deauth / disassoc... the whole situationship pipeline 😭


  • 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)

wowlan gang rise up (your laptop waking up at 3am for no reason, that's them) πŸ’€


πŸ’œ Neighbor Awareness Networking (NAN) πŸ’œ

NAN gets its own little neighbourhood, and it is thorough:

  • 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)

ten whole NAN entries. ten. that's commitment 🫑


back to the general pile, and it's a mood board of capabilities:

  • 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)
  • struct cfg80211_ops(9)

struct cfg80211_ops(9) is THE one, like the whole driver contract, the blueprint, the moment πŸ”₯


  • 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)

and then we hit struct wiphy(9) β€” the big one, the parent, the whole personality πŸ¦‹


✨ the wiphy lifecycle era ✨

this stretch is literally just "create it, register it, lock it, work it, free it". the entire ✨journey✨:

queue / cancel / flush / pending, four times over, three flavours. someone at the kernel really said "consistency is self-care" and honestly? slay 🌈


the wdev trio, short and sweet, we stan a compact API πŸŽ€


πŸ’… Utility functions πŸ’…

and HERE is our own house!! ieee80211_..._to_freq_khz(9) lives in this section, so these are all its roommates:

look at all the frequency-conversion besties 😭 the khz ones, the plain ones, the _khz variants β€” a whole conversion family reunion πŸ’–


πŸ¦‹ Data path helpers πŸ¦‹

where packets get massaged into shape. very "trust the process":

the find_elem / find_ie pairs, then the _ext_ versions, then the _vendor_ versions β€” that's four finders and they ALL count 🫢


🌸 Regulatory enforcement infrastructure 🌸

the "please don't transmit there, that's illegal" department. respectful, necessary, kinda scary:

and then there's the internal ones, which are still listed, so we still list them πŸ’…

back to notifying the world about stuff, because cfg80211 is a gossip and we love her:

note that cfg80211_x (no underscores) and __cfg80211_get_bss (two underscores) are BOTH listed and both separate entries β€” the double-underscore one is not a typo, it's just how it is, don't come for me πŸ™ˆ


🧚 RFkill integration 🧚

tiny section, big vibe (airplane mode says hi):


⭐ Vendor commands ⭐

for when your driver has ✨custom features✨:

alloc β†’ fill β†’ reply, the classic trio, and _ucast for the unicast girlies πŸ¦„


πŸ’€ Test mode πŸ’€

the "this is for bringing up hardware, be normal about it" corner:

same pattern as vendor commands but its own little namespace, and yes, they're all listed separately πŸ’–


and now we're into the connect/disconnect/roam saga, which is a whole emotional arc ngl:

note to self: cfg80211_del_sta_sinfo(9) and cfg80211_del_sta(9) are two different entries. both here. both matter. 🫢

the _khz variants are right there next to their non-_khz siblings, and the _ext versions sit beside the plain ones β€” that's the pattern, that's the list, and honestly it just keeps going, because this manpage literally does not stop here πŸ”₯

okay so the see-also list is still going, because of course it is β€” this page has main character energy and it's not done introducing you to the whole friend group πŸ’… here's the rest, grouped so you don't spiral:


and that's a wrap bestie, literally the whole page 🫢 this lil masterpiece lives in the kernel tree under ./include/net, and the doc build stamped it October 2026 β€” so yes, it's giving future-dated, it's giving timeless, it's giving ieee80211_c..._to_freq_khz(9) forever πŸ’– now go read the other manpages, ily, bye πŸŽ€

πŸ“¦ where this page comes from