STRUCT IEEE80211_HW(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

struct ieee80211_hw - hardware information and state

Kernel API Manual β†’ struct ieee80211_hw(9) 🫢

okay bestie, this is the big one: the struct that holds all the hardware info + state for an 802.11 PHY. it's giving β€œthe driver’s whole personality lives here” energy. πŸ’…


✨ SYNOPSIS ✨

struct ieee80211_hw {
    struct ieee80211_conf conf;
    struct wiphy *wiphy;
    const char *rate_control_algorithm;
    void *priv;
    unsigned long flags[BITS_TO_LONGS(NUM_IEEE80211_HW_FLAGS)];
    unsigned int extra_tx_headroom;
    unsigned int extra_beacon_tailroom;
    int vif_data_size;
    int sta_data_size;
    int chanctx_data_size;
    int txq_data_size;
    u16 queues;
    u16 max_listen_interval;
    s8 max_signal;
    u8 max_rates;
    u8 max_report_rates;
    u8 max_rate_tries;
    u16 max_rx_aggregation_subframes;
    u16 max_tx_aggregation_subframes;
    u8 max_tx_fragments;
    u8 offchannel_tx_hw_queue;
    u8 radiotap_mcs_details;
    u16 radiotap_vht_details;
    struct {
      int units_pos;
      s16 accuracy;
    } radiotap_timestamp;
    netdev_features_t netdev_features;
    u8 uapsd_queues;
    u8 uapsd_max_sp_len;
    u8 max_nan_de_entries;
    u8 tx_sk_pacing_shift;
    u8 weight_multiplier;
    u32 max_mtu;
    const s8 *tx_power_levels;
    u8 max_txpwr_levels_idx;
 };

lowkey just a whole vibe of fields, but every one matters. let’s go member by member, no skipping. πŸŽ€

🫢 Members 🫢

  • conf β€” a struct ieee80211_conf, AKA device configuration. don’t use. like, seriously, don’t.
  • wiphy β€” points to the struct wiphy allocated for this 802.11 PHY. you must fill in the perm_addr and dev members of this structure using SET_IEEE80211_DEV and SET_IEEE80211_PERM_ADDR. also, all supported bands (with channels, bitrates) are registered here. ✨
  • rate_control_algorithm β€” rate control algorithm for this hardware. if unset (NULL), the default algorithm will be used. must be set before calling ieee80211_register_hw. no procrastinating on this one. 🫑
  • priv β€” pointer to the private area that was allocated for driver use along with this structure.
  • flags β€” hardware flags, see enum ieee80211_hw_flags.
  • extra_tx_headroom β€” headroom to reserve in each transmit skb for use by the driver (e.g. for transmit headers).
  • extra_beacon_tailroom β€” tailroom to reserve in each beacon tx skb. can be used by drivers to add extra IEs.
  • vif_data_size β€” size (in bytes) of the drv_priv data area within struct ieee80211_vif.
  • sta_data_size β€” size (in bytes) of the drv_priv data area within struct ieee80211_sta.
  • chanctx_data_size β€” size (in bytes) of the drv_priv data area within struct ieee80211_chanctx_conf.
  • txq_data_size β€” size (in bytes) of the drv_priv data area within struct ieee80211_txq.
  • queues β€” number of available hardware transmit queues for data packets. WMM/QoS requires at least four, and these queues need to have configurable access parameters.
  • max_listen_interval β€” max listen interval in units of beacon interval that the HW supports.
  • max_signal β€” maximum value for signal (rssi) in RX information, used only when IEEE80211_HW_SIGNAL_UNSPEC or IEEE80211_HW_SIGNAL_DB.
  • max_rates β€” maximum number of alternate rate retry stages the hw can handle.
  • max_report_rates β€” maximum number of alternate rate retry stages the hw can report back.
  • max_rate_tries β€” maximum number of tries for each stage.
  • max_rx_aggregation_subframes β€” maximum buffer size (number of sub-frames) to be used for A-MPDU block ack receiver aggregation. this is only relevant if the device has restrictions on the number of subframes; if it relies on mac80211 to do reordering, it shouldn’t be set.
  • max_tx_aggregation_subframes β€” maximum number of subframes in an aggregate an HT/HE device will transmit. in HT AddBA we’ll advertise a constant value of 64 as some older APs crash if the window size is smaller (an example is LinkSys WRT120N with FW v1.0.07 build 002 Jun 18 2012). for AddBA to HE capable peers this value will be used. 🫠
  • max_tx_fragments β€” maximum number of tx buffers per (A)-MSDU, sum of 1 + skb_shinfo(skb)->nr_frags for each skb in the frag_list.
  • offchannel_tx_hw_queue β€” HW queue ID to use for offchannel TX (if IEEE80211_HW_QUEUE_CONTROL is set).
  • radiotap_mcs_details β€” lists which MCS information the HW reports. by default it is set to _MCS, _GI and _BW but doesn’t include _FMT. use IEEE80211_RADIOTAP_MCS_HAVE_values, only adding _BW is supported today.
  • radiotap_vht_details β€” lists which VHT MCS information the HW reports. the default is _GI | _BANDWIDTH. use the IEEE80211_RADIOTAP_VHT_KNOWN_values.
  • radiotap_timestamp β€” information for the radiotap timestamp field; if the units_pos member is set to a non-negative value then the timestamp field will be added and populated from the struct ieee80211_rx_status device_timestamp.
  • radiotap_timestamp.units_pos β€” must be set to a combination of a IEEE80211_RADIOTAP_TIMESTAMP_UNIT_* and a IEEE80211_RADIOTAP_TIMESTAMP_SPOS_* value.
  • radiotap_timestamp.accuracy β€” if non-negative, fills the accuracy in the radiotap field and the accuracy known flag will be set.
  • netdev_features β€” netdev features to be set in each netdev created from this HW. note that not all features are usable with mac80211, and other features will be rejected during HW registration.
  • uapsd_queues β€” this bitmap is included in (re)association frame to indicate for each access category if it is uAPSD trigger-enabled and delivery-enabled. use IEEE80211_WMM_IE_STA_QOSINFO_AC_* to set this bitmap. each bit corresponds to a different AC. value '1' in a specific bit means that the corresponding AC is both trigger- and delivery-enabled. '0' means neither enabled.
  • uapsd_max_sp_len β€” maximum number of total buffered frames the WMM AP may deliver to a WMM STA during any Service Period triggered by the WMM STA. use IEEE80211_WMM_IE_STA_QOSINFO_SP_* for correct values.
  • max_nan_de_entries β€” maximum number of NAN DE functions supported by the device.
  • tx_sk_pacing_shift β€” pacing shift to set on TCP sockets when frames from them are encountered. the default should typically not be changed, unless the driver has good reasons for needing more buffers.
  • weight_multiplier β€” driver specific airtime weight multiplier used while refilling deficit of each TXQ.
  • max_mtu β€” the max mtu could be set.
  • tx_power_levels β€” a list of power levels supported by the wifi hardware. the power levels can be specified either as integer or fractions. the power level at idx 0 shall be the maximum positive power level.
  • max_txpwr_levels_idx β€” the maximum valid idx of the tx_power_levels list.

πŸ¦‹ Description πŸ¦‹

bottom line, bestie: this structure contains the configuration and hardware information for an 802.11 PHY. it’s literally the whole setup-and-state situation, and every field above is part of the lore. 🌈

✨ SEE ALSO ✨

okay bestie, deep breath πŸ’– this is the whole mac80211 extended universe, and like… it's a lot. It's giving "the library has one card catalog and it's the size of a building." But it's also iconic, so here we go 🫢

First things first β€” everything here lives in the kernel file ./include/net/mac80211.h:

  • ./include/net/mac80211.h

Then the pages themselves, starting with the intro-level lore:

  • Introduction(9), Calling mac80211 from interrupts(9), Warning(9), Frame format(9), mac80211 workqueue(9), mac80211 software tx queueing(9), HW timestamping(9), enum ieee80211_max_queues(9), enum ieee80211_ac_numbers(9), struct ieee80211_tx_queue_params(9)

The channel-context girlies ✨:

  • enum ieee80211_chanctx_change(9), struct ieee80211_chan_req(9), struct ieee80211_chanctx_conf(9), enum ieee80211_chanctx_switch_mode(9), struct ieee80211_vif_chanctx_switch(9), enum ieee80211_bss_change(9)

Event + BSS-adjacent structs, no cap:

  • enum ieee80211_event_type(9), enum ieee80211_rssi_event_data(9), struct ieee80211_rssi_event(9), enum ieee80211_mlme_event_data(9), enum ieee80211_mlme_event_status(9), struct ieee80211_mlme_event(9), struct ieee80211_ba_event(9), struct ieee80211_event(9), struct ieee80211_mu_group_data(9), struct ieee80211_ftm_responder_params(9), struct ieee80211_fils_discovery(9), struct ieee80211_parsed_tpe(9), struct ieee80211_bss_npca_params(9), struct ieee80211_bss_conf(9), struct ieee80211_nan_channel(9), struct ieee80211_nan_peer_map(9), struct ieee80211_nan_peer_sched(9)

The tx section of the multiverse πŸ”₯:

  • enum mac80211_tx_info_flags(9), enum mac80211_tx_control_flags(9), enum mac80211_tx_status_flags(9), enum mac80211_rate_control_flags(9), struct ieee80211_tx_rate(9), struct ieee80211_tx_info(9), struct ieee80211_tx_status(9), struct ieee80211_scan_ies(9), ieee80211_tx_info_clear_status(9)

The rx girlies, keeping it symmetrical πŸ’…:

  • enum mac80211_rx_flags(9), enum mac80211_rx_encoding_flags(9), struct ieee80211_rx_status(9)

Configuration era 🌸:

  • enum ieee80211_conf_flags(9), enum ieee80211_conf_changed(9), enum ieee80211_smps_mode(9), struct ieee80211_conf(9), struct ieee80211_channel_switch(9)

VIFs and all their cousins (there are so many cousins):

Keys πŸ”‘:

  • enum ieee80211_key_flags(9), struct ieee80211_key_conf(9), struct ieee80211_key_seq(9), enum set_key_cmd(9)

Stations, links, txq, and a couple of macros that are lowkey the main characters:

These next ones are the doc chapters, and honestly kind of a vibe check for the whole driver:

  • Hardware crypto acceleration(9), Powersave support(9), Beacon filter support(9), Spatial multiplexing power save(9), Frame filtering(9), AP support for powersaving clients(9), HW queue control(9)

The ops core β€” the stuff you literally cannot skip, bestie:

  • enum ieee80211_filter_flags(9), enum ieee80211_ampdu_mlme_action(9), struct ieee80211_ampdu_params(9), enum ieee80211_frame_release_type(9), enum ieee80211_rate_control_changed(9), enum ieee80211_roc_type(9), enum ieee80211_reconfig_type(9), struct ieee80211_prep_tx_info(9), struct ieee80211_ops(9), ieee80211_alloc_hw_nm(9), ieee80211_alloc_hw(9), ieee80211_register_hw(9)

LEDs, teardown, and the restart trio πŸ‘‘

Receiving + powersave πŸ¦‹:

TX status reporting, aka the "did it send tho" files:

Beacon content, countdowns, and channel-switch finishing ✨:

Frame builders, come get y'all juice πŸ§ƒ:

TKIP and key-sequence stuff β€” yes, tkip really does show up five separate times 😭:

Queue control + scan completion, the traffic-cop section 🚦:

Iteration macros and friends (the for_each ones ate, fr fr):

Block-ack, station lookups, airtime, and key iteration πŸ’œ:

Loss, disconnect, CQM, radar, channel-switch, and ROC β€” the dramatic chapters 🎭:

RX block-ack, the whole saga 🌈:

Rate control, capability getters, RSSI, timestamps, wowlan, radiotap, NOA, TDLS, TID:

The TXQ scheduling club πŸ’€:

And the FINAL BATCH, we made it, I'm literally so proud of you πŸ₯Ή:


ngl that's a LOT of cross-references, but every single one is a real page you can pull up β€” go click around, it's a whole rabbit hole and it's kind of addictive πŸ™ˆ

And that's the whole thing, bestie β€” page done, brain full, vibes immaculate πŸ’– This one's from the ./include/net corner of the kernel docs, dated October 2026, and it's all about struct ieee80211_hw(9). Go take a nap, you earned it πŸŽ€βœ¨

πŸ“¦ where this page comes from