STRUCT IWL_NOTIFICATION_WAIT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct iwl_notification_wait β€” notification wait entry πŸ’–

okay bestie, so this is a page from the Kernel API Manual, and it's all about struct iwl_notification_wait β€” the little struct that holds a notification wait entry. it's giving "driver waiting for the firmware to text back" energy, and honestly? iconic. 🫢


✨ SYNOPSIS ✨

struct iwl_notification_wait {
    struct list_head list;
    bool (*fn)(struct iwl_notif_wait_data *notif_data, struct
iwl_rx_packet *pkt, void *data);
    void *fn_data;
    u16 cmds[MAX_NOTIF_CMDS];
    u8 n_cmds;
    bool triggered, aborted;
 };

like, that's the whole shape of it. no notes. πŸ’…


πŸŽ€ Members πŸŽ€

  • list β€” the list head for the global list. it's literally just here to be linked into the big list, keeping the group chat together. πŸ”—
  • fn β€” the function that gets called with the notification. here's the vibe check: if it returns true, the wait is over; if it returns false, the waiter stays blocked (sorry queen, keep waiting 😭). and if no function is given at all, then any of the listed commands will unblock the waiter. easy.
  • fn_data β€” pointer to pass to the fn's data argument. it's the little gift you hand over. 🎁
  • cmds β€” command IDs. yes, plural, it's an array. πŸ‘‘
  • n_cmds β€” number of command IDs. (the count, the receipts, the tally 🌸)
  • triggered β€” waiter should be woken up. it's awake!! ⭐
  • aborted β€” wait was aborted. nvm bestie, we're done here πŸ’€

🌈 Description 🌈

okay so this structure is not used directly β€” do not come for it like that. instead, to wait for a notification you declare it on the stack, and then call iwl_init_notification_wait with the appropriate parameters. then you go do whatever it is that will cause the ucode to notify the driver, and to actually wait for that you call iwl_wait_notification.

🚨 caveat queen: each notification is one-shot. if at some point we need to support multi-shot notifications (which, btw, can't be allocated on the stack) we need to modify the code for them. so don't get any ideas. πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/net/wireless/intel/iwlwifi/fw/notif-wait.h

okay that's the whole page, no cap. this was pulled straight from the Kernel API Manual, dated October 2026, from ./drivers/net/wireless/intel/i... β€” and the page itself is struct iwl_notification_wait(9), so you literally can't forget it now. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from