STRUCT HW_MODE_SPEC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 struct hw_mode_spec(9) β€” Kernel API Manual energy 🌸

okay bestie, buckle up, because this is a page straight out of the Kernel API Manual and it's literally all about one struct. yes, one. and it's kind of a big deal for wifi chipsets. let's get into it πŸ’…


✨ NAME ✨

struct hw_mode_spec β€” the Hardware specifications structure πŸŽ€ like, the whole vibe of a chipset in one neat little box.


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole thing, verbatim, no cap:

struct hw_mode_spec {
    unsigned int supported_bands;
  #define SUPPORT_BAND_2GHZ       0x00000001;
  #define SUPPORT_BAND_5GHZ       0x00000002;
    unsigned int supported_rates;
  #define SUPPORT_RATE_CCK        0x00000001;
  #define SUPPORT_RATE_OFDM       0x00000002;
    unsigned int num_channels;
    const struct rf_channel *channels;
    const struct channel_info *channels_info;
    struct ieee80211_sta_ht_cap ht;
 };

look at those #defines just living inside the struct body. iconic behavior honestly 🫢


πŸ’– Members πŸ’–

  • supported_bands β€” a bitmask that contains the supported bands (2.4GHz, 5.2GHz). bitmask bestie, so you can stack 'em 🌈
  • supported_rates β€” which rate types are supported (CCK, OFDM). pick your fighter ⭐
  • num_channels β€” the number of supported channels. and heads up: this is used as the array size for tx_power_a, tx_power_bg and channels β€” so it's not just decor, it's structural, iykyk πŸ’€
  • channels β€” device/chipset specific channel values (See struct rf_channel). the actual channel numbers, personalized per chipset πŸ’…
  • channels_info β€” additional information for channels (See struct channel_info). the extra lore πŸŽ€
  • ht β€” Driver HT Capabilities (See ieee80211_sta_ht_cap). high throughput stuff, main character energy πŸ‘‘

πŸ”₯ Description πŸ”₯

so basically: this struct holds details about the supported modes, rates and channels of a particular chipset. and the way that rt2x00lib uses it? it builds the ieee80211_hw_mode array for mac80211. literally the glow-up pipeline from chipset facts β†’ mac80211 config. slay ✨


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/net/wireless/ralink/rt2x00/rt2x00.h

and the whole friend group:


ngl that's a lot of queue functions. they really said "queue" 12 times and meant it πŸ’€

and that's the page, bestie 🧚 this lil' writeup came from ./drivers/net/wireless/ralink/... and it's dated October 2026 β€” catch you in the next struct hw_mode_spec(9) reading session, mwah πŸ’œπŸ“

πŸ“¦ where this page comes from