ieee80211_fi...ta_by_ifaddr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 ieee80211_find_sta_by_ifaddr(9) β€” the Kernel API Manual, bestie edition 🌸

okay so we're in the Kernel API Manual today and the entry is ieee80211_find_sta_by_ifaddr and honestly? it's giving "short function, big rules." buckle up πŸŽ€


✨ NAME ✨

ieee80211_find_sta_by_ifaddr β€” find a station on hardware πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct ieee80211_sta * ieee80211_find_sta_by_ifaddr (struct ieee80211_hw
*hw , const u8 *addr , const u8 *localaddr );

🌸 ARGUMENTS 🌸

  • hw β€” the pointer you got from ieee80211_alloc_hw. yes, that one. the hardware babygirl herself 🫢
  • addr β€” the remote station's address. who we're looking for, basically πŸ”
  • localaddr β€” the local address, i.e. vif->sdata->vif.addr. pass NULL for 'any'. (but like… read the notes first, ok? 😭)

⭐ RETURN ⭐

The station, if found. NULL otherwise. that's it, that's the vibe.


πŸ’€ NOTE πŸ’€

okay this is important so like, actually pay attention: this function must be called under RCU lock, and the resulting pointer is only valid under RCU lock as well. no cap, do not forget the lock πŸ«ΆπŸ”’


πŸ”₯ NOTE πŸ”₯

so you can pass NULL for localaddr, but then you'll just get the first STA that matches the remote address addr. and like… we can have multiple STA associated with multiple logical stations (think: a station connecting to another BSSID on the same AP hardware without disconnecting first πŸ™ˆ). in that case, the result of this method with localaddr as NULL is not reliable.

DO NOT USE THIS FUNCTION with localaddr NULL if at all possible. like fr fr, just don't πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/net/mac80211.h plus the entire extended family β€” seriously, it's a whole group chat:


and that's the whole thing πŸ’–βœ¨πŸŽ€ this page lives in ./include/net and it's dated October 2026 β€” thanks for reading bestie, now go lock your RCU and hydrate πŸ¦‹πŸ’…πŸ“

πŸ“¦ where this page comes from