ieee80211_sta_set_buffered(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ ieee80211_sta_set_buffered(9) β€” like, the Kernel API Manual page, bestie ✨

okay so real talk, this is the man page for ieee80211_sta_set_buffered, straight out of the Kernel API Manual section 9. it's a little function with a big job and honestly? it's giving "quietly holding the whole powersave situation together" πŸ’…


🌸 NAME 🌸

ieee80211_sta_set_buffered β€” the lil function that tells mac80211 the tea about frames your driver is buffering πŸ«–βœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

void ieee80211_sta_set_buffered (struct ieee80211_sta *sta , u8 tid ,
bool buffered );

πŸŽ€ ARGUMENTS πŸŽ€

  • sta β€” a struct ieee80211_sta pointer for the sleeping station 😴 like, the one currently napping
  • tid β€” the TID that has buffered frames πŸ‘€ (this is the traffic identifier in question, no cap)
  • buffered β€” says whether or not frames are buffered for this TID β€” yes/no, true/false, iconic binary energy βš–οΈ

πŸ’– DESCRIPTION πŸ’–

okay so picture this: your driver is buffering frames for a powersave station instead of handing them back to mac80211 for retransmission. valid. but here's the thing β€” the station may still need to be told that there are buffered frames, and the way it gets told is via the TIM bit πŸ‘‘

that's literally what this function is for. it informs mac80211 whether or not there are frames buffered in the driver for a given TID. mac80211 can then use that data to set the TIM bit. and the way that it does this might call back into the driver's set_tim call β€” so beware of the locking!! ⚠️ like, genuinely, locks are not a vibe to get wrong 😭

now, if all the frames get released to the station (due to PS-poll or uAPSD) then the driver needs to inform mac80211 that there no longer are frames buffered. no stale data, we don't do that here πŸ’… BUT β€” plot twist β€” when the station wakes up, mac80211 assumes that all buffered frames will be transmitted and clears this data. so drivers need to make sure they inform mac80211 about all buffered frames on the sleep transition (sta_notify with STA_NOTIFY_SLEEP). don't leave mac80211 hanging, it's rude 🫢

and finally, the technical lore 🧚: technically mac80211 only needs to know this per AC, not per TID. but since driver buffering will inevitably happen per TID (because it's related to aggregation), it's easier to just make mac80211 map the TID to the AC as required instead of keeping track of it in all the drivers that use this API. one brain doing the mapping > every driver doing its own bookkeeping. main character design decision, honestly ✨

⚠️ recap for the group chat: mac80211 may call back into the driver's set_tim when you call this β€” watch your locking. also the sleep transition (sta_notify with STA_NOTIFY_SLEEP) is where you spill all the buffered-frame tea. πŸ™ˆ

🌈 SEE ALSO 🌈

bestie. buckle in. this list is long β€” not me about to list every single one πŸ’€ but it's all here, every last one, because we do not skip entries in this house:


okay that's the whole page, no crumbs left behind πŸ“ and for the lil sign-off: this came from ./include/net, dated October 2026, and yes it's the ieee80211_sta_set_buffered(9) page we've been screaming about this whole time πŸ’œ go forth, set those buffered flags, mind the locks, and slay πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from