regulatory_hint(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 regulatory_hint(9) β€” or, "how to tell the wireless core where you think you are" 🌸

okay bestie, welcome to the regulatory_hint(9) page from the Kernel API Manual πŸ’… this is part 1 of a whole multi-part saga, so hydrate and let's go 🫢


✨ NAME ✨

regulatory_hint β€” a driver's little hint to the wireless core about what it thinks the regulatory domain is πŸ¦‹


✨ SYNOPSIS ✨

int regulatory_hint (struct wiphy *wiphy , const char *alpha2 );

✨ ARGUMENTS ✨

  • wiphy β€” the wireless device that's doing the hinting πŸ’– ngl this one is only used for reporting conflicts, that's literally its whole job here.
  • alpha2 β€” the ISO/IEC 3166 alpha2 code that the driver claims its regulatory domain should be in 🌍 if rd is set, this should be NULL. and hear me out: even if you set this to NULL, you still have to set rd->alpha2 to some accepted alpha2. no cap, don't skip that part πŸ™ˆ

✨ DESCRIPTION ✨

so the way this works 😌 wireless drivers can call this function to drop a hint to the wireless core about what it believes should be the current regulatory domain. you do that one of two ways, and honestly both are iconic:

  • hand over an ISO/IEC 3166 alpha2 country code that it knows its regulatory domain should be in 🌈
  • or provide a completely build regulatory domain πŸ‘‘

and if the driver provides an ISO/IEC 3166 alpha2, then userspace gets queried for a regulatory domain structure for that respective country. yes, userspace gets a say, that's the vibe πŸ’«

⚠️ important, don't sleep on this: the wiphy must have been registered to cfg80211 prior to this call. so for cfg80211 drivers that means you must first use wiphy_register, and for mac80211 drivers you must first use ieee80211_register_hw. order matters bestie, it's giving prerequisites πŸ”₯

drivers should check the return value β€” it's possible you can get a -ENOMEM 😭 so like, actually look at what it returns, okay?


✨ RETURN ✨

0 on success. -ENOMEM if the memory vibes are not immaculate πŸ’€


okay that's part 1 wrapped, don't go anywhere β€” more parts are coming πŸ’œ

🌈 SEE ALSO 🌈

okay bestie, this is the part where the page points you at literally every other page in the neighborhood, and there are so many 🫢 and yes every single one is listed below, no skips, no "etc." shortcuts, we don't do that here πŸ’…

  • Kernel file ./include/net/cfg80211.h β€” the actual header everything on this page lives inside, go read it if you want the source-of-truth vibe

🫢 start here

  • Introduction(9) β€” if you're brand new to this whole subsystem, start with this one, it's the vibe check πŸ‘‘
  • Device registration(9) β€” all about getting a device registered and known

πŸ¦‹ the caps & bands era

  • enum ieee80211_channel_flags(9) β€” the channel flags enum
  • struct ieee80211_channel(9) β€” the channel struct itself, main character energy
  • enum ieee80211_rate_flags(9) β€” flags for rates
  • enum ieee80211_bss_type(9) β€” BSS type enum
  • enum ieee80211_privacy(9) β€” the privacy enum
  • struct ieee80211_rate(9) β€” a rate, as a struct
  • struct ieee80211_he_obss_pd(9) β€” the HE OBSS PD struct
  • struct cfg80211_he_bss_color(9) β€” BSS color, HE flavored
  • struct ieee80211_sta_ht_cap(9) β€” HT capabilities for a station
  • struct ieee80211_sta_vht_cap(9) β€” VHT capabilities, the next gen upgrade
  • struct ieee80211_sta_he_cap(9) β€” HE caps, we're so back
  • struct ieee80211_eht_mcs_nss_supp(9) β€” EHT MCS/NSS support, the detailed one ✨
  • struct ieee80211_sta_eht_cap(9) β€” EHT capabilities, newest-gen energy
  • struct ieee80211_sta_uhr_cap(9) β€” UHR capabilities, yes there's another one
  • struct ieee80211_sband_iftype_data(9) β€” per-band, per-iftype data, lowkey important
  • enum ieee80211_edmg_bw_config(9) β€” EDMG bandwidth config enum
  • struct ieee80211_edmg(9) β€” the EDMG struct
  • struct ieee80211_sta_s1g_cap(9) β€” S1G caps
  • struct ieee80211_supported_band(9) β€” a supported band, iconic
  • _ieee80211_set_sband_iftype_data(9) β€” the one with the leading underscore πŸ‘€
  • ieee80211_set_sband_iftype_data(9) β€” the setter, no underscore
  • for_each_sband_iftype_data(9) β€” the loop macro, ilysm
  • ieee80211_get_sband_iftype_data(9) β€” the getter to match
  • ieee80211_get_he_iftype_cap(9) β€” grab the HE cap for an iftype
  • ieee80211_get_he_6ghz_capa(9) β€” HE 6 GHz capability getter
  • ieee80211_get_eht_iftype_cap(9) β€” EHT version of the same thing
  • ieee80211_get_uhr_iftype_cap(9) β€” and the UHR one, they really did all three 🫠
  • wiphy_read_of_freq_limits(9) β€” reads frequency limits out of of

πŸ’… actions and configuration

  • Actions and configuration(9) β€” this is the big one, everything about doing stuff lives here
  • struct vif_params(9) β€” virtual interface params
  • struct key_params(9) β€” key params, for your keys
  • struct cfg80211_chan_def(9) β€” the channel definition struct, you'll see it a lot
  • struct cfg80211_tid_cfg(9) β€” TID config struct
  • struct cfg80211_tid_config(9) β€” the full TID config, not to be confused with the one above 😭
  • struct cfg80211_fils_aad(9) β€” FILS AAD struct
  • struct cfg80211_set_hw_timestamp(9) β€” hardware timestamp setting struct

chandef girlies rise πŸŽ€

survey + crypto + AP setup 🌸

  • enum survey_info_flags(9) β€” survey info flags enum
  • struct survey_info(9) β€” the survey info struct
  • struct cfg80211_crypto_settings(9) β€” crypto settings, handle with care
  • struct cfg80211_mbssid_config(9) β€” MBSSID config
  • struct cfg80211_mbssid_elems(9) β€” MBSSID elements
  • struct cfg80211_rnr_elems(9) β€” RNR elements
  • struct cfg80211_beacon_data(9) β€” beacon data, the whole point of beacons tbh
  • struct cfg80211_acl_data(9) β€” ACL data
  • struct cfg80211_fils_discovery(9) β€” FILS discovery struct
  • struct cfg80211_unsol_bcast_probe_resp(9) β€” unsolicited broadcast probe response
  • struct cfg80211_s1g_short_beacon(9) β€” S1G short beacon
  • struct cfg80211_ap_settings(9) β€” AP settings, big one
  • struct cfg80211_ap_update(9) β€” AP update
  • struct cfg80211_csa_settings(9) β€” channel switch announcement settings
  • struct cfg80211_color_change_settings(9) β€” color change settings
  • struct iface_combination_params(9) β€” interface combination params

stations, rates, stats ✨

  • enum station_parameters_apply_mask(9) β€” the apply mask enum for station parameters
  • struct sta_txpwr(9) β€” station tx power
  • struct link_station_parameters(9) β€” link station params
  • struct link_station_del_parameters(9) β€” params for deleting a link station
  • struct cfg80211_ttlm_params(9) β€” TTLM params
  • struct station_parameters(9) β€” station params, the classic
  • struct station_del_parameters(9) β€” params for deleting a station
  • enum cfg80211_station_type(9) β€” station type enum
  • cfg80211_check_station_change(9) β€” checks a station change
  • enum rate_info_flags(9) β€” rate info flags
  • enum rate_info_bw(9) β€” rate info bandwidth enum
  • struct rate_info(9) β€” rate info struct
  • enum bss_param_flags(9) β€” BSS parameter flags
  • struct sta_bss_parameters(9) β€” station BSS parameters
  • struct cfg80211_txq_stats(9) β€” txq stats
  • struct cfg80211_tid_stats(9) β€” TID stats
  • struct link_station_info(9) β€” link station info
  • struct station_info(9) β€” station info, huge and iconic
  • struct cfg80211_sar_sub_specs(9) β€” SAR sub-specs
  • struct cfg80211_sar_specs(9) β€” SAR specs
  • struct cfg80211_sar_freq_ranges(9) β€” SAR frequency ranges
  • struct cfg80211_sar_capa(9) β€” SAR capabilities
  • cfg80211_get_station(9) β€” get a station
  • enum monitor_flags(9) β€” monitor flags enum
  • enum mpath_info_flags(9) β€” mpath info flags
  • struct mpath_info(9) β€” mpath info
  • enum wiphy_bss_param_flags(9) β€” wiphy BSS param flags
  • struct bss_parameters(9) β€” BSS parameters
  • struct mesh_config(9) β€” mesh config
  • struct mesh_setup(9) β€” mesh setup
  • struct ocb_setup(9) β€” OCB setup
  • struct ieee80211_txq_params(9) β€” txq params

🌸 scanning and BSS list handling

  • Scanning and BSS list handling(9) β€” the section that covers the whole scan-and-keep-track-of-BSS situation
  • struct cfg80211_ssid(9) β€” an SSID, as a struct
  • struct cfg80211_scan_info(9) β€” scan info
  • struct cfg80211_scan_6ghz_params(9) β€” 6 GHz scan params
  • struct cfg80211_scan_request(9) β€” a scan request
  • struct cfg80211_match_set(9) β€” match set
  • struct cfg80211_sched_scan_plan(9) β€” scheduled scan plan
  • struct cfg80211_bss_select_adjust(9) β€” BSS select adjust
  • struct cfg80211_sched_scan_request(9) β€” a scheduled scan request
  • enum cfg80211_signal_type(9) β€” signal type enum
  • struct cfg80211_inform_bss(9) β€” the inform-BSS struct
  • struct cfg80211_bss_ies(9) β€” BSS IEs
  • struct cfg80211_bss(9) β€” a BSS, the whole point
  • ieee80211_bss_get_elem(9) β€” grab an element out of a BSS
  • ieee80211_bss_get_ie(9) β€” the IE version of the same
  • struct cfg80211_auth_request(9) β€” auth request
  • struct cfg80211_assoc_link(9) β€” assoc link
  • struct cfg80211_ml_reconf_req(9) β€” ML reconfig request
  • enum cfg80211_assoc_req_flags(9) β€” assoc request flags
  • struct cfg80211_assoc_request(9) β€” assoc request
  • struct cfg80211_deauth_request(9) β€” deauth request, sad times 😭
  • struct cfg80211_disassoc_request(9) β€” disassoc request
  • struct cfg80211_ibss_params(9) β€” IBSS params
  • struct cfg80211_bss_selection(9) β€” BSS selection
  • struct cfg80211_connect_params(9) β€” connect params, you'll be here a while
  • enum cfg80211_connect_params_changed(9) β€” which connect params changed
  • enum wiphy_params_flags(9) β€” wiphy params flags
  • struct cfg80211_pmksa(9) β€” PMKSA struct
  • struct cfg80211_pkt_pattern(9) β€” packet pattern
  • struct cfg80211_wowlan_tcp(9) β€” WoWLAN TCP
  • struct cfg80211_wowlan(9) β€” WoWLAN, wake on wireless, genuinely obsessed
  • struct cfg80211_coalesce_rules(9) β€” coalesce rules
  • struct cfg80211_coalesce(9) β€” coalesce
  • struct cfg80211_wowlan_nd_match(9) β€” WoWLAN net-detect match
  • struct cfg80211_wowlan_nd_info(9) β€” WoWLAN net-detect info
  • struct cfg80211_wowlan_wakeup(9) β€” WoWLAN wakeup
  • struct cfg80211_gtk_rekey_data(9) β€” GTK rekey data
  • struct cfg80211_update_ft_ies_params(9) β€” params for updating FT IEs
  • struct cfg80211_mgmt_tx_params(9) β€” mgmt tx params
  • struct cfg80211_dscp_exception(9) β€” DSCP exception
  • struct cfg80211_dscp_range(9) β€” DSCP range
  • struct cfg80211_qos_map(9) β€” QoS map

🧚 Neighbor Awareness Networking (NAN)

  • Neighbor Awareness Networking (NAN)(9) β€” the NAN section itself, say hi πŸ‘‹
  • struct cfg80211_nan_band_config(9) β€” NAN band config
  • struct cfg80211_nan_conf(9) β€” NAN config
  • struct cfg80211_nan_channel(9) β€” NAN channel
  • struct cfg80211_nan_local_sched(9) β€” NAN local schedule
  • struct cfg80211_nan_peer_map(9) β€” NAN peer map
  • struct cfg80211_nan_peer_sched(9) β€” NAN peer schedule
  • enum cfg80211_nan_conf_changes(9) β€” which NAN config bits changed
  • struct cfg80211_nan_func_filter(9) β€” NAN function filter
  • struct cfg80211_nan_func(9) β€” a NAN function

πŸ‘‘ the wiphy files

  • struct cfg80211_pmk_conf(9) β€” PMK config
  • struct cfg80211_external_auth_params(9) β€” external auth params
  • struct cfg80211_ftm_responder_stats(9) β€” FTM responder stats
  • struct cfg80211_pmsr_ftm_result(9) β€” PMSR FTM result
  • struct cfg80211_pmsr_result(9) β€” PMSR result
  • struct cfg80211_pmsr_ftm_request_peer(9) β€” PMSR FTM request peer
  • struct cfg80211_pmsr_request_peer(9) β€” PMSR request peer
  • struct cfg80211_pmsr_request(9) β€” PMSR request
  • struct cfg80211_update_owe_info(9) β€” update OWE info
  • struct mgmt_frame_regs(9) β€” management frame registrations
  • struct cfg80211_ops(9) β€” the ops struct, the backbone of your driver tbh
  • enum wiphy_flags(9) β€” wiphy flags
  • struct ieee80211_iface_limit(9) β€” interface limits
  • struct ieee80211_iface_combination(9) β€” interface combinations
  • enum wiphy_wowlan_support_flags(9) β€” WoWLAN support flags
  • struct wiphy_wowlan_support(9) β€” WoWLAN support
  • struct wiphy_coalesce_support(9) β€” coalesce support
  • enum wiphy_vendor_command_flags(9) β€” vendor command flags
  • enum wiphy_opmode_flag(9) β€” opmode flag enum
  • struct sta_opmode_info(9) β€” station opmode info
  • struct wiphy_vendor_command(9) β€” a vendor command
  • struct wiphy_iftype_ext_capab(9) β€” iftype extended capabilities
  • cfg80211_get_iftype_ext_capa(9) β€” get those extended capabilities
  • struct cfg80211_pmsr_capabilities(9) β€” PMSR capabilities
  • struct wiphy_iftype_akm_suites(9) β€” iftype AKM suites
  • struct wiphy_radio_cfg(9) β€” wiphy radio config
  • struct wiphy_radio_freq_range(9) β€” wiphy radio freq range
  • struct wiphy_radio(9) β€” a wiphy radio
  • enum wiphy_nan_flags(9) β€” wiphy NAN flags
  • struct wiphy_nan_capa(9) β€” wiphy NAN capabilities
  • struct wiphy(9) β€” the wiphy struct itself, absolute icon πŸ‘‘
  • wiphy_priv(9) β€” grab the driver-private part of a wiphy
  • priv_to_wiphy(9) β€” go the other way, private back to wiphy
  • set_wiphy_dev(9) β€” set the device on a wiphy
  • wiphy_dev(9) β€” get the device
  • wiphy_name(9) β€” the wiphy's name
  • wiphy_new_nm(9) β€” make a new wiphy with a name
  • wiphy_new(9) β€” make a new wiphy
  • wiphy_register(9) β€” register it
  • rcu_dereference_wiphy(9) β€” RCU deref a wiphy
  • wiphy_dereference(9) β€” the wiphy deref helper
  • get_wiphy_regdom(9) β€” get the wiphy's regulatory domain
  • wiphy_unregister(9) β€” unregister it
  • wiphy_free(9) β€” free it, and don't forget this one πŸ™ˆ
  • wiphy_lock(9) β€” lock it
  • wiphy_unlock(9) β€” unlock it, please
  • wiphy_work_queue(9) β€” queue wiphy work
  • wiphy_work_cancel(9) β€” cancel wiphy work
  • wiphy_work_flush(9) β€” flush wiphy work
  • wiphy_delayed_work_queue(9) β€” queue delayed wiphy work
  • wiphy_delayed_work_cancel(9) β€” cancel delayed wiphy work
  • wiphy_delayed_work_flush(9) β€” flush delayed wiphy work
  • wiphy_delayed_work_pending(9) β€” is delayed work pending
  • wiphy_hrtimer_work_queue(9) β€” queue hrtimer work
  • wiphy_hrtimer_work_cancel(9) β€” cancel hrtimer work
  • wiphy_hrtimer_work_flush(9) β€” flush hrtimer work
  • wiphy_hrtimer_work_pending(9) β€” is hrtimer work pending
  • enum ieee80211_ap_reg_power(9) β€” AP regulatory power enum
  • struct wireless_dev(9) β€” the wireless dev struct, another icon
  • wdev_priv(9) β€” the private part of a wireless dev
  • wdev_chandef(9) β€” the chandef of a wireless dev

✨ Utility functions


πŸ“ Data path helpers


πŸ”₯ regulatory enforcement infrastructure


πŸŽ€ Internal regulatory db functions

  • Internal regulatory db functions(9) β€” internal, so, yk, be careful πŸ™ˆ
  • reg_query_regdb_wmm(9) β€” query the regulatory db for WMM info

πŸ’œ more scanning / BSS / management


🌈 RFkill integration


🌈 Vendor commands


⭐ Test mode


🫢 connection / roam / mgmt notifications

Okay so this list is long long, bestie β€” 64 whole entries β€” so we're breaking it into little clusters so your brain doesn't just log off πŸ’… every name is exactly as it appears, promise, no cap.

πŸ¦‹ the beaconing & channel crew

the "can I even beacon here" trio, iconic honestly πŸŽ€

🌸 channel switches & operating classes

look at all these lil conversions going both ways, it's giving very "i know a guy" energy ✨

🫢 interfaces, devices & features

the register/unregister twins are lowkey main characters here 😭 and yes, cfg80211_shutdown_all_interfaces(9) really said "all of them" πŸ’€

🧚 p2p, IEs & fragmenting

splitting and fragmenting, the way that these just carve things up, obsessed πŸ“

πŸ’œ wakeups, crit protos & supported channels

three little besties doing completely different jobs, and honestly? valid 🌈

πŸŽ€ NAN gang (they get their own section fr)

nine nan entries, they're literally a friend group πŸ‘‘

πŸ”₯ auth, pmsr & assoc

the assoc comeback is such a vibe name honestly, whoever named it ate πŸ’…

πŸ’– BSS, colour & 6GHz

a whole colour-change saga with a start, an abort and a notify β€” it's giving trilogy 🎬

🌟 MLO & channel checks

reconfig add done is such a "finally finished, anyway" moment 😌

⭐ debugfs & S1G & incumbent signals

start freq, end freq, primary sibling β€” the S1G trio said "we come as a set" 🫢


aaaand that's the whole list, all 64 of them, nobody left behind πŸ’– go read them, they're literally right there, iykyk. if you got all the way down here you're a real one fr fr 😭🫢

sign-off time 🧚✨ this little masterpiece lives in ./include/net, dated October 2026, and it's all about regulatory_hint(9) β€” go forth and look up every single one of those cross-refs, bestie, you've got this πŸ’…πŸ‘‘

πŸ“¦ where this page comes from