HANDLERS FOR FW NOTIFICATIONS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– Handlers for fw notifications πŸ’–

Kernel API Manual, section 9 β€” ok bestie, this one's all about fw notification handlers, and honestly? It's giving "small page, big consequences." Let's get into it 🫢


✨ DESCRIPTION ✨

So here's the rundown: this page lists the notification IDs (and yeah, that includes the group ID), the handler for each notification, and how that handler should be called. That's the whole vibe check. πŸ’…

πŸŽ€ The two handler flavors

  • RX_HANDLER_SYNC β€” gets called as part of the Rx path. Right then, right there, no detours. ⚑
  • RX_HANDLER_ASYNC β€” gets handled in a working with the wiphy_lock held. So it's doing its little task later, but with the lock firmly in its grip. πŸ”’
⚠️ Ok this part is important, don't skip it: ordering is NOT guaranteed across those two. Like, at all. If the firmware sends two notifications A and B in that order, and notification A is RX_HANDLER_ASYNC while notification B is RX_HANDLER_SYNC, then the handler of B will likely be called before the handler of A. 😭 Yeah. Out of order. That's just how it is.

πŸ¦‹ Ordering & context deets

  • This list should be in order of frequency, for performance purposes. Most-common stuff up top, bestie β€” it's a performance thing, trust. πŸ”₯
  • The handler can be one from two contexts β€” see iwl_rx_handler_context for the receipts. πŸ‘€

🧚 Cancellation, aka "what if my object gets yeeted?"

A handler can declare that it relies on a specific object β€” and in that case it can be cancelled if that object is deleted. No cap, that's the whole point of the mechanism.

To actually use it, you need a cancellation function, and here's the spec, character for character:

  • It must receive an object id (that's the index of that object in the firmware) and a notification payload.
  • It returns true if that specific notification should be cancelled upon the obliteration of the specific instance of the object. πŸ’€

🌸 DEFINE_SIMPLE_CANCELLATION

This macro is your low-effort icon ✨ β€” it lets you easily create a cancellation function that will simply return true if a given object id matches the object id in the firmware notification. That's it. That's the function. Simple, clean, iconic. πŸ‘‘


🌈 SEE ALSO 🌈

  • Kernel file ./drivers/net/wireless/intel/iwlwifi/mld/notif.c
  • Notification versioning(9)

πŸ’– That's the page, bestie! Written under the Kernel API Manual banner, sourced from ./drivers/net/wireless/intel/i..., dated October 2026, and filed right back under Handlers fo...otifications(9) β€” mwah, slay, periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from