cfg80211_chandef_get_width(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cfg80211_chandef_get_width β€” from the Kernel API Manual πŸŽ€

okay bestie, so this one is a lil function from the Kernel API Manual and it's honestly not that deep, but it IS important, so let's get into it ✨


🌸 NAME 🌸

cfg80211_chandef_get_width β€” she returns the chandef width, in MHz πŸ’–

Like, that's it. That's her whole job. And she does it beautifully.


πŸ¦‹ SYNOPSIS πŸ¦‹

int cfg80211_chandef_get_width (const struct cfg80211_chan_def *c );

no cap, that's the whole signature. look at her go 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • c β€” the chandef you want the bandwidth for, bestie πŸ’… she's a const struct cfg80211_chan_def *, so you're just looking at her, not touching. respectful. iconic. ✨

⭐ RETURN ⭐

so she hands you back the channel width in MHz for whatever chandef you passed in πŸ”₯

🚨 but listen β€” important lil plot twist: for 80+80 configurations, she returns 80. not 160. just 80. so don't come for her when your math looks weird, that's literally the documented behavior, iykyk πŸ’€

that's part one, stay tuned, there's more coming πŸŒˆπŸ’œ

✨ SEE ALSO ✨

okay bestie, buckle up, because the SEE ALSO list for this one is not a snack, it's a whole buffet πŸ˜­πŸ’… β€” but like, a good buffet, the kind where you fill your plate and every single thing slaps. Everything here is section 9, and honestly the fastest way to actually get cfg80211 is to just vibe with all of it.

So the main character of the whole header file situation is ./include/net/cfg80211.h β€” that's the source file, ./include/net/cfg80211.h, no cap. Start your reading journey with Introduction(9) and then Device registration(9) if you want the lore before the lore 🫢.

Then we get into the band/capability girlies, and honestly they ate:


Then it's giving "Actions and configuration" energy πŸ”₯ β€” like the whole drama of setting things up. Go read Actions and configuration(9) after this page, and then the whole chandef cinematic universe:

and the survey / crypto / AP / station-parameter squad, which is a lot but they're all iconic in their own way πŸ’–:

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

Next up: Scanning and BSS list handling(9) β€” literally the "finding the wifi" arc 🌸 and it's a long arc, bestie:

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

Then NAN hours πŸ¦‹ Neighbor Awareness Networking (NAN)(9) is so real, plus the PMK/auth/measurement crowd:

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

Now the driver-side wiphy section, aka the big one, aka the lore drop πŸ‘‘:


Utility functions(9) next, and these are the little guys that carry the whole operation πŸŽ€:

and Data path helpers(9) β€” the packet girlies, lowkey the ones doing the actual work 🫢:


Regulatory time βš–οΈ β€” Regulatory enforcement infrastructure(9) is one of those where the rules are the main character:

Then BSS/MLME reporting, which is a lot but every single one matters 😭:

RFkill integration(9) πŸ›‘, Vendor commands(9) πŸ§ƒ, Test mode(9) πŸ§ͺ β€” the trio of "driver, but make it extra":


And finally, the Connect/Disconnect/Roam/Mgmt notification finale πŸ’€ β€” deep breath, bestie, this is the big finish and it goes hard:


yeah. that's the list. that's the whole list. ngl it's giving "the library is the documentation" energy πŸ’… and honestly? obsessed. there's more page coming, so don't go anywhere bestie πŸ¦‹βœ¨


okay that's the whole friend group πŸ’– like genuinely, that's the entire rollout β€” every single one of those has its own page, so if you're the type of person who falls down a rabbit hole at 3am clicking through cross-references (me, I'm that person πŸ™ˆ), you are so fed.

go read them, bestie, you'll be so smart ✨


and that's a wrap on the whole page πŸŽ€ this lil guy lives over in ./include/net, stamped October 2026, and the page itself is cfg80211_chandef_get_width(9) β€” my beloved. now go forth and get those widths correct, no cap πŸ’…πŸ¦‹

πŸ“¦ where this page comes from