STRUCT IWL_MEI(9)
β¨ struct iwl_mei β¨
okay so this is from the Kernel API Manual and it's literally the struct that holds all the private data for iwl_mei π
(yes the original NAME line says "private date" β we're choosing to believe they meant data, but we're reporting the typo honestly because iykyk π«Ά).
Think of it as the main character's group chat: every wait queue, every work item, every bool, all vibing in one struct. Let's get into it π₯
πΈ SYNOPSIS πΈ
struct iwl_mei {
wait_queue_head_t get_nvm_wq;
struct work_struct send_csa_msg_wk;
wait_queue_head_t get_ownership_wq;
struct iwl_mei_shared_mem_ptrs shared_mem;
struct mei_cl_device *cldev;
struct iwl_mei_nvm *nvm;
struct iwl_mei_filters *filters;
bool got_ownership;
bool amt_enabled;
bool csa_throttled;
bool csme_taking_ownership;
bool link_prot_state;
bool device_down;
struct delayed_work csa_throttle_end_wk;
wait_queue_head_t pldr_wq;
bool pldr_active;
spinlock_t data_q_lock;
struct work_struct netdev_work;
struct delayed_work ownership_dwork;
atomic_t sap_seq_no;
atomic_t seq_no;
struct dentry *dbgfs_dir;
};
copy it exactly bestie, don't be cute with it π
π Members π
get_nvm_wqβ the wait queue for theget_nvmflow. it sits here and waits. iconic behaviour honestly.send_csa_msg_wkβ used to defer the transmission of theCHECK_SHARED_AREAmessage. the whole reason it exists? so we can sendCHECK_SHARED_AREAfrom atomic contexts. no cap, that's the flex β‘get_ownership_wqβ the wait queue for theget_ownership_flow. yep, another one. she queues, she waits, she slays πshared_memβ the memory that is shared between CSME and the host π«Άcldevβ the pointer to the MEI client devicenvmβ the data returned by the CSME for the NVMfiltersβ the filters sent by CSMEgot_ownershipβtrueif we own the device πamt_enabledβtrueif CSME has wireless enabledcsa_throttledβ whentrue, we can't sendCHECK_SHARED_AREAover the MEI bus, but rather need to wait untilsend_csa_msg_wkruns. it's giving "hold please, I'm busy" πcsme_taking_ownershipβtruewhen CSME is taking ownership. used to remember to sendCSME_OWNERSHIP_CONFIRMEDwhen the driver completes its down flow. she remembers. she always remembers. π§link_prot_stateβtruewhen we are in link protectionPASSIVEdevice_downβtrueif the device is down. used to remember to sendCSME_OWNERSHIP_CONFIRMEDwhen the driver is already down. same energy as above, different bool fr frcsa_throttle_end_wkβ used whencsa_throttledistrue. yes it's a delayed work. yes it's here for the throttle β¨pldr_wqβ the wait queue for PLDR flowpldr_activeβ PLDR flow is in progress πdata_q_lockβ protects the access to the data queues which are accessed without the mutex. lowkey important, don't sleep on the lock πnetdev_workβ used to defer registering and unregistering of the netdev to avoid taking the rtnl lock in the SAP messages handlers. very "I'll do it later so I don't deadlock" of her πownership_dworkβ used to re-ask for NIC ownership after ownership was taken by CSME or when a previous ownership request failed. she's persistent, she's a delayed work, she's not giving up πsap_seq_noβ the sequence number for the SAP messagesseq_noβ the sequence number for the SAP messages. yes. the exact same description. no we didn't mix them up, that's what it says π«dbgfs_dirβ the debugfs dir entry β
π¦ SEE ALSO π¦
- Kernel file
./drivers/net/wireless/intel/iwlwifi/mei/main.cstructiwl_mei_cache(9)
ok that's the whole struct, go read that main.c file if you want the full lore π
this masterpiece is dated October 2026, lives at ./drivers/net/wireless/intel/i... (truncated by the man page itself, not by me π), and the whole thing is filed under struct iwl_mei(9). mwah, 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