STRUCT TID_AMPDU_RX(9)
π struct tid_ampdu_rx(9) π
okay so bestie, we're in the Kernel API Manual today and the star of the show is struct tid_ampdu_rx β literally the TID aggregation info for the Rx side. no cap, this is the whole vibe. let's get into it π«Ά
β¨ NAME β¨
struct tid_ampdu_rx β TID aggregation information (Rx). that's it, that's the tweet π
πΈ SYNOPSIS πΈ
struct tid_ampdu_rx {
struct rcu_head rcu_head;
spinlock_t reorder_lock;
u64 reorder_buf_filtered;
struct sta_info *sta;
struct timer_list session_timer;
struct timer_list reorder_timer;
unsigned long last_rx;
u16 head_seq_num;
u16 stored_mpdu_num;
u16 ssn;
u16 buf_size;
u16 timeout;
u8 tid;
u8 auto_seq:1, removed:1, started:1;
struct {
struct sk_buff_head buf;
unsigned long time;
} reorder[];
};
look at her. she's structured. she's iconic. she's got a flexible array member at the end like a little surprise π
π¦ Members π¦
time for the member-by-member tour, bestie β i'm gonna hold your hand through every single one:
rcu_headβ the RCU head that gets used for freeing this struct. think of it as the little "bye bye" ticket ποΈreorder_lockβ serializes access to the reorder buffer (peep below for the deets). one at a time, babes, one at a time πreorder_buf_filteredβ a bitmap showing where there are filtered frames sitting in the reorder buffer that should be ignored when releasing frames. lowkey a "do not disturb" list βstaβ the station we are attached to. your plus-one, essentially π«Άsession_timerβ checks if the peer keeps Tx-ing on the TID (by the timeout value). like a "are you still there??" text πreorder_timerβ releases expired frames from the reorder buffer. she's the one cleaning up π§Ήlast_rxβ jiffies of the last rx activity. the timestamp of the last time anybody said anything β°head_seq_numβ head sequence number in the reordering buffer. the front of the line, main character energy πstored_mpdu_numβ number of MPDUs hanging out in the reordering buffer. headcount, fr fr π’ssnβ the Starting Sequence Number expected to be aggregated. the beginning of the story β¨buf_sizeβ buffer size for incoming A-MPDUs. how much room we're giving 'em π¦timeoutβ reset timer value (in TUs). the clock, bestie β³tidβ TID number. a little number, big responsibilities πauto_seqβ used for offloaded BA sessions to automatically pickhead_seq_andandssn. (yes, that's exactly how it's written, i'm not touching it π)removedβ this session is removed (but might still have been found due to RCU). she's gone but likeβ¦ not fully gone πstartedβ this session has started (head ssn or higher was received). we're so back π₯reorderβ the reorder buffer entries. the whole squad πreorder.bufβ thestruct sk_buff_headfor the frames, since there could be multiple at each entry from an A-MSDU reported as individual subframes. it's giving "it's complicated" πreorder.timeβ time when this entry was filled (jiffies). when did this happen? here's the receipt β±οΈ
π Description π
okay so the important lore: this structure's lifetime is managed by RCU, and assignments to the array holding it must hold the aggregation mutex. no skipping that, bestie, that's a hard rule π¨
the reorder_lock is what protects the members of this struct β except for timeout, buf_size and dialog_token, which are constant across the lifetime of the struct (and the dialog token is only used for debugging, so, y'know, she's just there for the plot π΅οΈ).
lowkey reminder: those three are exempt from the lock because they never change. don't come for them, they're fine π
β SEE ALSO β
go check out the kernel file ./net/mac80211/sta_info.h and these absolute legends:
enum ieee80211_sta_info_flags(9)struct tid_ampdu_tx(9)struct sta_ampdu_mlme(9)struct ieee80211_fast_tx(9)struct ieee80211_fast_rx(9)struct mesh_sta(9)struct link_sta_info(9)struct ieee80211_sta_removed_link_stats(9)struct sta_info(9)__sta_info_flush(9)sta_info_flush(9)
the whole friend group, honestly π«π
and that's the page, bestie!! π this one lives at ./net/mac80211, dated October 2026, and it's filed under struct tid_ampdu_rx(9) β mwah, go read the source, ily, bye πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms