STRUCT IWL_MEI(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 the get_nvm flow. it sits here and waits. iconic behaviour honestly.
  • send_csa_msg_wk β€” used to defer the transmission of the CHECK_SHARED_AREA message. the whole reason it exists? so we can send CHECK_SHARED_AREA from atomic contexts. no cap, that's the flex ⚑
  • get_ownership_wq β€” the wait queue for the get_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 device
  • nvm β€” the data returned by the CSME for the NVM
  • filters β€” the filters sent by CSME
  • got_ownership β€” true if we own the device πŸ‘‘
  • amt_enabled β€” true if CSME has wireless enabled
  • csa_throttled β€” when true, we can't send CHECK_SHARED_AREA over the MEI bus, but rather need to wait until send_csa_msg_wk runs. it's giving "hold please, I'm busy" 😭
  • csme_taking_ownership β€” true when CSME is taking ownership. used to remember to send CSME_OWNERSHIP_CONFIRMED when the driver completes its down flow. she remembers. she always remembers. 🧠
  • link_prot_state β€” true when we are in link protection PASSIVE
  • device_down β€” true if the device is down. used to remember to send CSME_OWNERSHIP_CONFIRMED when the driver is already down. same energy as above, different bool fr fr
  • csa_throttle_end_wk β€” used when csa_throttled is true. yes it's a delayed work. yes it's here for the throttle ✨
  • pldr_wq β€” the wait queue for PLDR flow
  • pldr_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 messages
  • seq_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.c struct iwl_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