STRUCT TID_AMPDU_RX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 pick head_seq_and and ssn. (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 β€” the struct sk_buff_head for 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