ieee80211_sta_block_awake(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ieee80211_sta_block_awake β€” a Kernel API Manual moment (section 9, bestie) πŸ’–

okay so picture this: it's a section 9 manual page, she's from the Kernel API Manual, and her whole job is vibing about blocking stations from waking up. no cap, she's lowkey a legend and we're gonna get into it. ✨


🌸 NAME 🌸

ieee80211_sta_block_awake β€” block station from waking up. that's it. that's the whole name. she does exactly what it says on the tin, main character energy only. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

void ieee80211_sta_block_awake (struct ieee80211_hw *hw , struct
ieee80211_sta *pubsta , bool block );

look at her. three args, returns nothing, absolutely unbothered. πŸŽ€


πŸ“ ARGUMENTS πŸ“

  • hw β€” the hardware. yeah. THE hardware. the actual chip situation. 🫢
  • pubsta β€” the station. the one we're talking about. the girl in question. πŸ‘‘
  • block β€” whether to block or unblock. it's a bool, so it's giving "yes or no, pick one, no in-between." πŸ”₯

✨ DESCRIPTION ✨

okay so here's the tea β˜• β€” some devices are picky. like, highkey picky. they require that all frames that are on the queues for a specific station that went to sleep are flushed before a poll response, or frames after the station woke up, can be delivered to that it. and yes, the original says "to that it," we're keeping it, it's iconic, we don't fix it. 😭

⚠️ important detail bestie: such frames must be rejected by the driver as filtered, with the appropriate status flag. that's not a suggestion, that's the rules. πŸ™ˆ

this function lets you implement this whole mode in a race-free manner. race-free!! she said no to chaos, yes to order. πŸ’€βœ¨

so how do you actually do the thing? glad you asked:

  1. a driver must keep track of the number of frames still enqueued for a specific station. bookkeeping era. πŸ“‹
  2. if this number is not zero when the station goes to sleep, the driver must call this function to force mac80211 to consider the station to be asleep regardless of the station's actual state. like, we're lying to mac80211 for its own good. gaslight gatekeep girlboss. πŸ’…
  3. once the number of outstanding frames reaches zero, the driver must call this function again to unblock the station. πŸŽ‰

and what does unblocking do? so glad you asked, because it's giving consequences:

  • it will cause mac80211 to be able to send ps-poll responses 🐝
  • and if the station queried in the meantime, then frames will also be sent out as a result of this πŸ“¬
  • additionally, the driver will be notified that the station woke up some time after it is unblocked β€” and that's regardless of whether the station actually woke up while blocked or not. she's a little unpredictable like that, but we love her. πŸ’œ

🌈 SEE ALSO 🌈

okay. deep breath. this list is long long. like, unhinged long. but we don't skip, we don't summarise, we list every single one because that's the assignment and we ate. πŸ”₯πŸ‘‘

first up, the source of truth:

  • Kernel file ./include/net/mac80211.h

then the whole extended universe, in order, no cap:

like… 274 of them. we counted. we're obsessed. iykyk. πŸ§šπŸ’–


and that's the page!! ok bye bestie, go keep those frame counters accurate, stay race-free, and remember β€” this whole thing lives at ./include/net, dated October 2026, and it's ieee80211_sta_block_awake(9) forever. slay πŸ’…βœ¨πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from