STRUCT WIPHY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so, bestie, welcome to struct wiphy(9) β€” the manual page for struct wiphy, aka the wireless hardware description ✨ this thing is a whole mood, and we’re going member by member, no cap.

🌸 NAME 🌸

struct wiphy - wireless hardware description

✨ SYNOPSIS ✨

here’s the full struct, copied exactly because we do not mess with source, periodt:

       struct wiphy {
           struct mutex mtx;
           u8 perm_addr[ETH_ALEN];
           u8 addr_mask[ETH_ALEN];
           struct mac_address *addresses;
           const struct ieee80211_txrx_stypes *mgmt_stypes;
           const struct ieee80211_iface_combination *iface_combinations;
           int n_iface_combinations;
           u16 software_iftypes;
           u16 n_addresses;
           u16 interface_modes;
           u16 max_acl_mac_addrs;
           u32 flags, regulatory_flags, features;
           u8 ext_features[DIV_ROUND_UP(NUM_NL80211_EXT_FEATURES, 8)];
           u32 ap_sme_capa;
           enum cfg80211_signal_type signal_type;
           int bss_priv_size;
           u8 max_scan_ssids;
           u8 max_sched_scan_reqs;
           u8 max_sched_scan_ssids;
           u8 max_match_sets;
           u16 max_scan_ie_len;
           u16 max_sched_scan_ie_len;
           u32 max_sched_scan_plans;
           u32 max_sched_scan_plan_interval;
           u32 max_sched_scan_plan_iterations;
           int n_cipher_suites;
           const u32 *cipher_suites;
           int n_akm_suites;
           const u32 *akm_suites;
           const struct wiphy_iftype_akm_suites *iftype_akm_suites;
           unsigned int num_iftype_akm_suites;
           u8 retry_short;
           u8 retry_long;
           u32 frag_threshold;
           u32 rts_threshold;
           u8 coverage_class;
           char fw_version[ETHTOOL_FWVERS_LEN];
           u32 hw_version;
         #ifdef CONFIG_PM;
           const struct wiphy_wowlan_support *wowlan;
           struct cfg80211_wowlan *wowlan_config;
         #endif;
           u16 max_remain_on_channel_duration;
           u8 max_num_pmkids;
           u32 available_antennas_tx;
           u32 available_antennas_rx;
           u32 probe_resp_offload;
           const u8 *extended_capabilities, *extended_capabilities_mask;
           u8 extended_capabilities_len;
           const struct wiphy_iftype_ext_capab *iftype_ext_capab;
           unsigned int num_iftype_ext_capab;
           const void *privid;
           struct ieee80211_supported_band *bands[NUM_NL80211_BANDS];
           void (*reg_notifier)(struct wiphy *wiphy, struct regulatory_request
       *request);
           struct wiphy_radio_cfg *radio_cfg;
           const struct ieee80211_regdomain *regd;
           struct device dev;
           bool registered;
           struct dentry *debugfsdir;
           const struct ieee80211_ht_cap *ht_capa_mod_mask;
           const struct ieee80211_vht_cap *vht_capa_mod_mask;
           struct list_head wdev_list;
           possible_net_t _net;
         #ifdef CONFIG_CFG80211_WEXT;
           const struct iw_handler_def *wext;
         #endif;
           const struct wiphy_coalesce_support *coalesce;
           const struct wiphy_vendor_command *vendor_commands;
           const struct nl80211_vendor_cmd_info *vendor_events;
           int n_vendor_commands, n_vendor_events;
           u16 max_ap_assoc_sta;
           u8 max_num_csa_counters;
           u32 bss_param_support;
           u32 bss_select_support;
           u8 nan_supported_bands;
           struct wiphy_nan_capa nan_capa;
           u32 txq_limit;
           u32 txq_memory_limit;
           u32 txq_quantum;
           unsigned long tx_queue_len;
           u8 support_mbssid:1, support_only_he_mbssid:1;
           const struct cfg80211_pmsr_capabilities *pmsr_capa;
           struct {
             u64 peer, vif;
             u8 max_retry;
           } tid_config_support;
           u8 max_data_retry_count;
           const struct cfg80211_sar_capa *sar_capa;
           struct rfkill *rfkill;
           u8 mbssid_max_interfaces;
           u8 ema_max_profile_periodicity;
           u16 max_num_akm_suites;
           u16 hw_timestamp_max_peers;
           int n_radio;
           const struct wiphy_radio *radio;
           char priv[];
        };

🧚 Members 🧚

okay, member-by-member tour, part 1 energy, let’s go 🫢

  • mtx β€” mutex for the data (structures) of this device.
  • perm_addr β€” permanent MAC address of this device.
  • addr_mask β€” if the device supports multiple MAC addresses by masking, set this to a mask with variable bits set to 1, e.g. if the last four bits are variable then set it to 00-00-00-00-00-0f. The actual variable bits shall be determined by the interfaces added, with interfaces not matching the mask being rejected to be brought up.
  • addresses β€” if the device has more than one address, set this pointer to a list of addresses (6 bytes each). The first one will be used by default for perm_addr. In this case, the mask should be set to all-zeroes. In this case it is assumed that the device can handle the same number of arbitrary MAC addresses.
  • mgmt_stypes β€” bitmasks of frame subtypes that can be subscribed to or transmitted through nl80211, points to an array indexed by interface type.
  • iface_combinations β€” valid interface combinations array, should not list single interface types.
  • n_iface_combinations β€” number of entries in iface_combinations array.
  • software_iftypes β€” bitmask of software interface types, these are not subject to any restrictions since they are purely managed in SW.
  • n_addresses β€” number of addresses in addresses.
  • interface_modes β€” bitmask of interfaces types valid for this wiphy, must be set by driver.
  • max_acl_mac_addrs β€” maximum number of MAC addresses that the device supports for ACL.
  • flags β€” wiphy flags, see enum wiphy_flags.
  • regulatory_flags β€” wiphy regulatory flags, see enum ieee80211_regulatory_flags.
  • features β€” features advertised to nl80211, see enum nl80211_feature_flags.
  • ext_features β€” extended features advertised to nl80211, see enum nl80211_ext_feature_index.
  • ap_sme_capa β€” AP SME capabilities, flags from enum nl80211_ap_sme_features.
  • signal_type β€” signal type reported in struct cfg80211_bss.
  • bss_priv_size β€” each BSS struct has private data allocated with it, this variable determines its size.
  • max_scan_ssids β€” maximum number of SSIDs the device can scan for in any given scan.
  • max_sched_scan_reqs β€” maximum number of scheduled scan requests that the device can run concurrently.
  • max_sched_scan_ssids β€” maximum number of SSIDs the device can scan for in any given scheduled scan.
  • max_match_sets β€” maximum number of match sets the device can handle when performing a scheduled scan, 0 if filtering is not supported.
  • max_scan_ie_len β€” maximum length of user-controlled IEs device can add to probe request frames transmitted during a scan, must not include fixed IEs like supported rates.
  • max_sched_scan_ie_len β€” same as max_scan_ie_len, but for scheduled scans.
  • max_sched_scan_plans β€” maximum number of scan plans (scan interval and number of iterations) for scheduled scan supported by the device.
  • max_sched_scan_plan_interval β€” maximum interval (in seconds) for a single scan plan supported by the device.
  • max_sched_scan_plan_iterations β€” maximum number of iterations for a single scan plan supported by the device.
  • n_cipher_suites β€” number of supported cipher suites.
  • cipher_suites β€” supported cipher suites.
  • n_akm_suites β€” number of supported AKM suites.
  • akm_suites β€” supported AKM suites. These are the default AKMs supported if the supported AKMs not advertized for a specific interface type in iftype_akm_suites.
  • iftype_akm_suites β€” array of supported akm suites info per interface type. Note that the bits in iftypes_mask inside this structure cannot overlap (i.e. only one occurrence of each type is allowed across all instances of iftype_akm_suites).
  • num_iftype_akm_suites β€” number of interface types for which supported akm suites are specified separately.
  • retry_short β€” Retry limit for short frames (dot11ShortRetryLimit).
  • retry_long β€” Retry limit for long frames (dot11LongRetryLimit).
  • frag_threshold β€” Fragmentation threshold (dot11FragmentationThreshold); -1 = fragmentation disabled, only odd values >= 256 used.
  • rts_threshold β€” RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled.
  • coverage_class β€” current coverage class.
  • fw_version β€” firmware version for ethtool reporting.
  • hw_version β€” hardware version for ethtool reporting.
  • wowlan β€” WoWLAN support information.
  • wowlan_config β€” current WoWLAN configuration; this should usually not be used since access to it is necessarily racy, use the parameter passed to the suspend operation instead.
  • max_remain_on_channel_duration β€” Maximum time a remain-on-channel operation may request, if implemented.
  • max_num_pmkids β€” maximum number of PMKIDs supported by device.
  • available_antennas_tx β€” bitmap of antennas which are available to be configured as TX antennas. Antenna configuration commands will be rejected unless this or available_antennas_rx is set.
  • available_antennas_rx β€” bitmap of antennas which are available to be configured as RX antennas. Antenna configuration commands will be rejected unless this or available_antennas_tx is set.
  • probe_resp_offload β€” Bitmap of supported protocols for probe response offloading. See enum nl80211_probe_resp_offload_support_attr. Only valid when the wiphy flag WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD is set.
  • extended_capabilities β€” extended capabilities supported by the driver, additional capabilities might be supported by userspace; these are the 802.11 extended capabilities ("Extended Capabilities element") and are in the same format as in the information element. See 802.11-2012 8.4.2.29 for the defined fields. These are the default extended capabilities to be used if the capabilities are not specified for a specific interface type in iftype_ext_capab.
  • extended_capabilities_mask β€” mask of the valid values.
  • extended_capabilities_len β€” length of the extended capabilities.
  • iftype_ext_capab β€” array of extended capabilities per interface type.
  • num_iftype_ext_capab β€” number of interface types for which extended capabilities are specified separately.
  • privid β€” a pointer that drivers can use to figure out whether some random wiphy is actually theirs, like in global notifiers. your personal little name tag for the wiphy πŸ’…
  • bands β€” the info about all the bands/channels this device supports. literally the whole map of what it can do ✨
  • reg_notifier β€” the driver's regulatory notification callback. heads up: if your driver uses wiphy_apply_custom_regulatory, then the reg_notifier's request can be passed as NULL. no cap.
  • radio_cfg β€” configuration of radios belonging to a muli-radio wiphy. this struct contains a list of all radio specific attributes and should be used only for multi-radio wiphy. don't be out here using it for single-radio setups bestie πŸ™ˆ
  • regd β€” the driver's regulatory domain, if one was requested via the regulatory_hint API. the driver can use this on the reg_notifier if it chooses to ignore future regulatory domain changes caused by other drivers. main character energy: you get to opt out of the drama πŸ”₯
  • dev β€” the (virtual) struct device for this wiphy. the item in /sys/class/ieee80211/ points to this. you need use set_wiphy_dev (see below). yes, actually β€” it's required.
  • registered β€” protects ->resume and ->suspend sysfs callbacks against unregister hardware. it's giving bodyguard for your sysfs callbacks 🫢
  • debugfsdir β€” debugfs directory used for this wiphy (ieee80211/<wiphyname>). it will be renamed automatically on wiphy renames. iconic, it handles its own glow-up ✨
  • ht_capa_mod_mask β€” specify what ht_cap values can be over-ridden. if null, then none can be over-ridden.
  • vht_capa_mod_mask β€” specify what VHT capabilities can be over-ridden. if null, then none can be over-ridden.
  • wdev_list β€” the list of associated (virtual) interfaces. ⚠️ this list must not be modified by the driver, but it can be read with RTNL/RCU protection. look but don't touch, fr fr.
  • _net β€” the network namespace this wiphy currently lives in.
  • wext β€” wireless extension handlers.
  • coalesce β€” packet coalescing support information.
  • vendor_commands β€” array of vendor commands supported by the hardware.
  • vendor_events β€” array of vendor events supported by the hardware.
  • n_vendor_commands β€” number of vendor commands.
  • n_vendor_events β€” number of vendor events.
  • max_ap_assoc_sta β€” maximum number of associated stations supported in AP mode (including P2P GO) or 0 to indicate no such limit is advertised. the driver is allowed to advertise a theoretical limit that it can reach in some cases, but may not always reach. so like, a vibe-based ceiling, not a promise πŸ’€
  • max_num_csa_counters β€” Number of supported csa_counters in beacons and probe responses. this value should be set if the driver wishes to limit the number of csa counters. Default (0) means infinite. no limits, just vibes 🌈
  • bss_param_support β€” bitmask indicating which bss_parameters as defined in struct bss_parameters the driver can actually handle in the .change_bss callback. the bit positions are defined in enum wiphy_bss_param_flags.
  • bss_select_support β€” bitmask indicating the BSS selection criteria supported by the driver in the .connect callback. the bit position maps to the attribute indices defined in enum nl80211_bss_select_attr.
  • nan_supported_bands β€” bands supported by the device in NAN mode, a bitmap of enum nl80211_band values. for instance, for NL80211_BAND_2GHZ, bit 0 would be set (i.e. BIT(NL80211_BAND_2GHZ)). iykyk πŸ¦‹
  • nan_capa β€” NAN capabilities.
  • txq_limit β€” configuration of internal TX queue frame limit.
  • txq_memory_limit β€” configuration internal TX queue memory limit.
  • txq_quantum β€” configuration of internal TX queue scheduler quantum.
  • tx_queue_len β€” allow setting transmit queue len for drivers not using wake_tx_queue.
  • support_mbssid β€” can HW support association with nontransmitted AP.
  • support_only_he_mbssid β€” don't parse MBSSID elements if it is not HE AP, in order to avoid compatibility issues. support_mbssid must be set for this to have any effect. πŸŽ€
  • pmsr_capa β€” peer measurement capabilities.
  • tid_config_support β€” describes the per-TID config support that the device has.
  • tid_config_support.peer β€” bitmap of attributes (configurations) supported by the driver for each peer.
  • tid_config_support.vif β€” bitmap of attributes (configurations) supported by the driver for each vif.
  • tid_config_support.max_retry β€” maximum supported retry count for long/short retry configuration.
  • max_data_retry_count β€” maximum supported per TID retry count for configuration through the NL80211_TID_CONFIG_ATTR_RETRY_SHORT and NL80211_TID_CONFIG_ATTR_RETRY_LONG attributes.
  • sar_capa β€” SAR control capabilities.
  • rfkill β€” a pointer to the rfkill structure.
  • mbssid_max_interfaces β€” maximum number of interfaces supported by the driver in a multiple BSSID set. this field must be set to a non-zero value by the driver to advertise MBSSID support. no zero, no support, periodt πŸ’…
  • ema_max_profile_periodicity β€” maximum profile periodicity supported by the driver. setting this field to a non-zero value indicates that the driver supports enhanced multi-BSSID advertisements (EMA AP).
  • max_num_akm_suites β€” maximum number of AKM suites allowed for configuration through NL80211_CMD_CONNECT, NL80211_CMD_ASSOCIATE and NL80211_CMD_START_AP. set to NL80211_MAX_NR_AKM_SUITES if not set by driver. if set by driver, minimum allowed value is NL80211_MAX_NR_AKM_SUITES in order to avoid compatibility issues with legacy userspace and maximum allowed value is CFG80211_MAX_NUM_AKM_SUITES. boundaries bestie, respect them 🚧
  • hw_timestamp_max_peers β€” maximum number of peers that the driver supports enabling HW timestamping for concurrently. setting this field to a non-zero value indicates that the driver supports HW timestamping. a value of CFG80211_HW_TIMESTAMP_ALL_PEERS indicates the driver supports enabling HW timestamping for all peers (i.e. no need to specify a mac address). everyone invited to the party πŸŽ‰
  • n_radio β€” number of radios.
  • radio β€” radios belonging to this wiphy.
  • priv β€” driver private data (sized according to wiphy_new parameter).

πŸ‘€ SEE ALSO πŸ‘€

okay so this section is literally the guest list of the whole party πŸ’… every single related page gets a shoutout here, and there are… a lot of them. no skipping, bestie β€” we're going through all of them, and they all live in the kernel file ./include/net/cfg80211.h. buckle up πŸŽ€

see, that wasn't so bad πŸ¦‹ next batch:

still hydrated? good, keep going πŸ’œ

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

and then the NAN era 🧚:

halfway-ish, no cap πŸ”₯

regulatory girlies rise 🌈:

final stretch, we're so close 😭🫢:

okay and that's the whole guest list β€” every single name, exactly as written, no cap πŸ‘‘ but bestie do NOT scroll away, there's more coming 🫢

okay so we're picking up mid-SEE ALSO and bestie… this cross-reference list is enormous 😭 the kernel girlies really said "link everything" and honestly? respect the commitment. no skips, no cap, here's the rest of the crew in exactly the order they show up:

next up, the whole operating class and chandef friend group, lowkey the conversion clique of the kernel:

and then, living their best lives right after:

register/unregister block, the flop-and-slay pipeline:

fast BSS transition era, and note that one of these is a struct bestie, not a function β€” don't get it twisted πŸ™ˆ:

then the IE crowd, aka the "say it five times fast" section of the page:

moving right along:

and the channel-combination and iface-shutdown squad:

ext features, tiny but mighty:

now the NAN chapter of the list, and yes the name is fun to say, iykyk:

auth and measurement time:

then these three, which are giving "I have a very specific job" ✨:

BSS and colour-change era, aka the glow-up arc 🌈:

6 GHz and MLO girlies:

a couple of scheduler-adjacent icons:

back to NAN for round two, because of course there's a round two:

debugfs duo, the quiet legends:

and finally, the S1G + incumbent-signal finale, closing out the list like the headliners they are:


and that's a wrap on struct wiphy(9) bestie πŸ’… the source for this page lives over in ./include/net, and the version we're reading is dated October 2026 β€” so if your kernel is older than that, vibe check your docs before you come for me 😌 go forth, register your wiphys, and slay βœ¨πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from