STRUCT IL_CFG(9)
π struct il_cfg(9) β Kernel API Manual β¨
okay so this is a page from the Kernel API Manual and it's all about struct il_cfg(9) β the config struct for the iwlegacy driver. bestie, it's a big one, but we're gonna get through it together π«Ά
πΈ NAME πΈ
struct il_cfg β
and that's it. that's the whole NAME section. the description after the dash is literally empty, no cap π so consider this your official vibe check: the name is struct il_cfg, and the manpage authors left the one-liner blank. iconic of them honestly.
β¨ SYNOPSIS β¨
here's the whole struct, character for character, do not touch:
struct il_cfg {
const char *name;
const char *fw_name_pre;
const unsigned int ucode_api_max;
const unsigned int ucode_api_min;
u8 valid_tx_ant;
u8 valid_rx_ant;
unsigned int sku;
u16 eeprom_ver;
u16 eeprom_calib_ver;
const struct il_mod_params *mod_params;
struct il_base_params *base_params;
u8 scan_rx_antennas[NUM_NL80211_BANDS];
enum il_led_mode led_mode;
int eeprom_size;
int num_of_queues;
int num_of_ampdu_queues;
u32 pll_cfg_val;
bool set_l0s;
bool use_bsm;
u16 led_compensation;
int chain_noise_num_beacons;
unsigned int wd_timeout;
bool temperature_kelvin;
const bool ucode_tracing;
const bool sensitivity_calib_by_driver;
const bool chain_noise_calib_by_driver;
const u32 regulatory_bands[7];
};
look at all those fields. she's got range π
π Members π
fw_name_preβ the firmware filename prefix. this is a "before" picture, not the whole name, okay? the api version and the extension (.ucode) get added onto it before the file is loaded from disk. so the filename ends up built likefw_name_pre<api>.ucodeβ prefix, then api, then.ucode. slay πucode_api_maxβ the highest version of the uCode API that the driver supports. the ceiling. the limit. the "don't even try it" line π₯ucode_api_minβ the lowest version of the uCode API that the driver supports. the floor π§led_modeβ here's the mapping, memorize it:0=blinking,1=On(RF On)/Off(RF Off). that's it, that's the whole scale β
π¦ Description π¦
so the whole point here: we enable the driver to be backward compatible wrt API version. the driver says which APIs it supports β ucode_api_max is the highest, ucode_api_min is the lowest β and firmware will only be loaded if it has a supported API version. no supported version? no firmware. bye π
once it does load, the firmware's API version gets stored in il_priv, which is the whole reason the driver can make runtime changes based on which firmware version is actually in use. main character energy for il_priv honestly π
for example, lowkey this is the whole flow:
if (IL_UCODE_API(il->ucode_ver) >= 2) { Driver interacts with Firmware API version >= 2. } else { Driver interacts with Firmware API version 1. }
(yes that's how it's formatted in the original, i'm not touching it, it's perfect as is π)
and the ideal usage of this whole infrastructure? treat a new ucode API release as a new hardware revision. like, that's the dream. that is, through utilizing the il_hcmd_utils_ops etc., we accommodate different command structures and flows between hardware versions as well as their API versions. so the hardware version and the API version both get a seat at the table π«Ά
π SEE ALSO π
first up, the actual file this lives in: Kernel file ./drivers/net/wireless/intel/iwlegacy/common.h
and then the whole friend group, all of them, in order, no one gets left out:
struct il_device_cmd(9)struct il_device_cmd_huge(9)struct il_rx_queue(9)struct il_ht_agg(9)struct il_vif_priv(9)struct il_hw_params(9)il_clear_driver_stations(9)il_sta_id_or_broadcast(9)il_queue_inc_wrap(9)il_queue_dec_wrap(9)il_beacon_time_mask_low(9)il_beacon_time_mask_high(9)struct il_rb_status(9)struct il_tfd_tb(9)struct il_tfd(9)struct il_rate_scale_data(9)struct il_scale_tbl_info(9)struct il_lq_sta(9)il3945_rate_scale_init(9)
π sign-off π
this page came to you from ./drivers/net/wireless/intel/i... (the path got cut off, we don't know the rest, that's just how the footer is, don't come for me π) and it's dated October 2026. go forth and configure your structs, bestie. periodt π
β¨π
π¦ 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