ieee80211_it...e_interfaces(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ieee80211_iterate_interfaces β€” Kernel API Manual, section 9

okay bestie, sit down, because this one is actually so useful. It's ieee80211_iterate_interfaces(9) and it lives in the Kernel API Manual, section 9. yes, we're in kernel-doc territory. hydration check: drink some water before you read this, it's long. 🫢


🌸 NAME 🌸

ieee80211_iterate_interfaces β€” iterate interfaces

like, literally what it says. it iterates interfaces. no cap. ✨


πŸŽ€ SYNOPSIS πŸŽ€

void ieee80211_iterate_interfaces (struct ieee80211_hw *hw , u32
iter_flags , void (*iterator)(void *data, u8 *mac, struct ieee80211_vif
*vif) , void *data );

she's a void function, so don't go looking for a return value, there isn't one. she returns nothing and she's unbothered about it. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • hw β€” the hardware struct of which the interfaces should be iterated over. like, this is the hardware. the one whose interfaces we're walking through. main character energy honestly πŸ‘‘
  • iter_flags β€” iteration flags, see enum ieee80211_interface_iteration_flags. go look at the enum if you wanna know what the flags do, because they're defined over there, not here. iykyk πŸ”₯
  • iterator β€” the iterator function to call. this is your callback, bestie. it gets invoked for the interfaces. signature is right up there in the synopsis, don't get it twisted.
  • data β€” first argument of the iterator function. it's your little bag of stuff you pass through, and it lands as the first arg of the callback. very convenient, very slay πŸŽ€

⭐ DESCRIPTION ⭐

so here's the vibe: this function iterates over the interfaces associated with a given hardware and calls the callback for them. that's it, that's the whole job. 🌈

and listen β€” this includes active as well as inactive interfaces. not just the ones doing stuff. the whole roster. everyone gets a callback. no one gets left on read. πŸ’–

the actually iconic part: this function allows the iterator function to sleep. yes, really. your callback may sleep. that's the whole reason this variant exists, so don't waste it. 😭

one more thing, and this is the detail that gets people: Will iterate over a new interface during add_interface. so like, if an interface is being added, the iterator will see it. noted. 🧚


πŸ’€ SEE ALSO πŸ’€

okay this list is long long. like, unhinged long. but we don't skip, so here's every single one, bestie. Kernel file ./include/net/mac80211.h first, then the whole friend group:


ok that was a lot of links. you did it though. proud of you. 🫢✨

and that's the whole page, bestie! this one came straight out of ./include/net, October 2026, Kernel API Manual section 9 β€” ieee80211_it...e_interfaces(9). mwah, go iterate something. πŸ’–πŸ’…πŸŽ€

πŸ“¦ where this page comes from