STRUCT IEEE80211_TX_RATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct ieee80211_tx_rate(9) πŸ¦‹

okay so this is the struct ieee80211_tx_rate(9) page from the Kernel API Manual, and it's literally about rate selection/status. Stay with me bestie, it's actually iconic once it clicks πŸ’–


🌸 NAME 🌸

struct ieee80211_tx_rate β€” rate selection/status. That's the whole name section, short and slay ✨


✨ SYNOPSIS ✨

here's the struct in all its bitfield glory:

struct ieee80211_tx_rate {
    s8 idx;
    u16 count:5, flags:11;
 };

πŸŽ€ Members πŸŽ€

  • idx β€” rate index to attempt to send with. yes, this is the "which rate are we trying" girly πŸ’…
  • count β€” number of tries in this rate before going to the next rate. it's giving "how many attempts before we move on" energy 🫢
  • flags β€” rate control flags (enum mac80211_rate_control_flags). the little extra info attached to the rate 🌸

πŸ’– Description πŸ’–

So a value of -1 for idx indicates an invalid rate. And if it's used in an array of retry rates, it also means that no more rates should be tried. like, the rate list has left the chat, stop trying to send πŸ’€

When used for transmit status reporting, the driver should always report the rate along with the flags it used. always, bestie β€” no skipping the receipts πŸ™ˆ

struct ieee80211_tx_info contains an array of these structs in the control information, and it will be filled by the rate control algorithm according to what should be sent. so the rate control algorithm is the main character here πŸ‘‘

For example, if this array contains, in the format { <idx>, <count> }, the information:

{ 3, 2 }, { 2, 2 }, { 1, 4 }, { -1, 0 }, { -1, 0 }

then this means that the frame should be transmitted up to twice at rate 3, up to twice at rate 2, and up to four times at rate 1 if it doesn't get acknowledged. it's giving "try again" energy but scheduled 🌈

Say it gets acknowledged by the peer after the fifth attempt, the status information should then contain:

{ 3, 2 }, { 2, 2 }, { 1, 1 }, { -1, 0 } ...

since it was transmitted twice at rate 3, twice at rate 2 and once at rate 1 after which we received an acknowledgement. math is mathing πŸ’…


πŸ’… SEE ALSO πŸ’…

Kernel file ./include/net/mac80211.h β€” that's where the lore lives. and now the whole guest list, every single name, because we do not gatekeep 🫢:

mwah πŸ’‹ β€” source/version: ./include/net, date: October 2026, page: struct ieee80211_tx_rate(9). that's the footer folded into a cute sign-off, periodt 🫢

πŸ“¦ where this page comes from