STRUCT HW_MODE_SPEC(9)
πΈ 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 fortx_power_a,tx_power_bgandchannelsβ so it's not just decor, it's structural, iykyk πchannelsβ device/chipset specific channel values (Seestruct rf_channel). the actual channel numbers, personalized per chipset πchannels_infoβ additional information for channels (Seestruct channel_info). the extra lore πhtβ Driver HT Capabilities (Seeieee80211_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:
rt2x00queue_map_txskb(9)rt2x00queue_unmap_skb(9)rt2x00queue_get_tx_queue(9)rt2x00queue_get_entry(9)rt2x00queue_pause_queue(9)rt2x00queue_unpause_queue(9)rt2x00queue_start_queue(9)rt2x00queue_stop_queue(9)rt2x00queue_flush_queue(9)rt2x00queue_start_queues(9)rt2x00queue_stop_queues(9)rt2x00queue_flush_queues(9)rt2x00debug_dump_frame(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms