ieee80211_it...contexts_mtx(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ ieee80211_it...contexts_mtx(9) β€” Kernel API Manual πŸ¦‹

okay so this is the Kernel API Manual page for ieee80211_iter_chan_contexts_mtx, and bestie, it's literally the β€œiterate channel contexts” function. No cap. πŸ’–

✨ NAME ✨

ieee80211_iter_chan_contexts_mtx β€” iterate channel contexts. That's the whole vibe. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

here's the exact signature, character for character:

void ieee80211_iter_chan_contexts_mtx (struct ieee80211_hw *hw , void
       (*iter)(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf
       *chanctx_conf, void *data) , void *iter_data );

🌈 ARGUMENTS 🌈

  • hw β€” pointer obtained from ieee80211_alloc_hw. Yes bestie, that's the hw pointer.
  • iter β€” iterator function. It's the callback doing the per-context thing.
  • iter_data β€” data passed to iterator function. It goes straight to your iter function.

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so ieee80211_iter_chan_contexts_mtx iterates all active channel contexts. It's giving β€œfor each active chanctx, do the thing” ✨

but there is a big catch, and it's not optional: this function can only be used while holding the wiphy mutex. Not β€œshould,” not β€œmaybe,” can only. So lock that mutex first, periodt. πŸ”’

the iterator has some specific timing tea:

  • It will not find a context that's being added β€” like, during the driver callback to add it, it's not visible to the iterator yet. πŸ™ˆ
  • It will find it while it's being removed. So removal is visible during iteration, even though addition isn't. πŸ’€

and the hardware restart note is important: during hardware restart, all contexts that existed before the restart are considered already present, so they will be found while iterating β€” whether they've been re-added already or not. So a context being found by the iterator doesn't necessarily mean it's already been re-added. slay, but be aware. 🫢

πŸ’– SEE ALSO πŸ’–

the whole reference squad, fr fr:


and that's the page, bestie πŸ’œ this one's from source/version ./include/net, dated October 2026, and the banner is ieee80211_it...contexts_mtx(9). mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from