ENUM HWSIM_TX_RATE_FLAGS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ enum hwsim_tx_rate_flags(9) ✨

okay so real talk, bestie β€” this is from the Kernel API Manual, and it's literally the enum that holds all the per-rate flags that the rate control algorithm sets. πŸ’… And before you ask: yeah, it's inspired by struct mac80211_rate_control_flags. the rules are simple, queen β€” new flags may be appended, but old flags not deleted, because that's what keeps compatibility for userspace. no cap, that's the whole vibe. 🫢


🌸 SYNOPSIS 🌸

enum hwsim_tx_rate_flags {
    MAC80211_HWSIM_TX_RC_USE_RTS_CTS ,
    MAC80211_HWSIM_TX_RC_USE_CTS_PROTECT ,
    MAC80211_HWSIM_TX_RC_USE_SHORT_PREAMBLE ,
    MAC80211_HWSIM_TX_RC_MCS ,
    MAC80211_HWSIM_TX_RC_GREEN_FIELD ,
    MAC80211_HWSIM_TX_RC_40_MHZ_WIDTH ,
    MAC80211_HWSIM_TX_RC_DUP_DATA ,
    MAC80211_HWSIM_TX_RC_SHORT_GI ,
    MAC80211_HWSIM_TX_RC_VHT_MCS ,
    MAC80211_HWSIM_TX_RC_80_MHZ_WIDTH ,
    MAC80211_HWSIM_TX_RC_160_MHZ_WIDTH

};

πŸŽ€ Constants πŸŽ€

okay so here's the whole cast, and every single one of them is a main character in their own right:

  • MAC80211_HWSIM_TX_RC_USE_RTS_CTS β€” use an RTS/CTS exchange for this rate. handshake first, transmit second, etiquette icon. 🀝
  • MAC80211_HWSIM_TX_RC_USE_CTS_PROTECT β€” CTS-to-self protection is required. it gets set when the current BSS requires ERP protection. protective queen behavior πŸ’…
  • MAC80211_HWSIM_TX_RC_USE_SHORT_PREAMBLE β€” use short preamble. short and sweet, literally. ✨
  • MAC80211_HWSIM_TX_RC_MCS β€” HT rate. that's it, that's the whole flag. πŸ¦‹
  • MAC80211_HWSIM_TX_RC_GREEN_FIELD β€” tells you whether this rate should be used in Greenfield mode 🌱 (yes the name is adorable, yes it's real)
  • MAC80211_HWSIM_TX_RC_40_MHZ_WIDTH β€” says whether the Channel Width should be 40 MHz. big channel energy πŸ“Ά
  • MAC80211_HWSIM_TX_RC_DUP_DATA β€” the frame should be transmitted on both of the adjacent 20 MHz channels, but only if the current channel type is NL80211_CHAN_HT40MINUS or NL80211_CHAN_HT40PLUS. sooo conditional, we love a flag with boundaries 🫢
  • MAC80211_HWSIM_TX_RC_SHORT_GI β€” Short Guard interval should be used for this rate. get in, get out, no guard-interval loitering πŸƒβ€β™€οΈ
  • MAC80211_HWSIM_TX_RC_VHT_MCS β€” VHT MCS rate. and here's the lore: in this case the idx field is split into a higher 4 bits (Nss) and lower 4 bits (MCS number). bit-splitting? iconic. πŸ”₯
  • MAC80211_HWSIM_TX_RC_80_MHZ_WIDTH β€” indicates 80 MHz transmission πŸ“‘
  • MAC80211_HWSIM_TX_RC_160_MHZ_WIDTH β€” indicates 160 MHz transmission. and ngl, a lil caveat: 80+80 isn't supported yet πŸ™ˆ (she said "yet", so watch this space)

🌈 Description 🌈

so basically these flags get set by the Rate control algorithm for each rate during tx, and they live in the flags member of struct ieee80211_tx_rate. that's the tea β˜• β€” per rate, during tx, in flags, every time.


πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, bestie, they're all in the kernel file ./drivers/net/wireless/virtual/mac80211_hwsim.h unless noted:

  • enum hwsim_tx_control_flags(9)
  • Frame transmission/registration support(9)
  • enum hwsim_commands(9)
  • enum hwsim_attrs(9)
  • struct hwsim_tx_rate(9)
  • struct hwsim_tx_rate_flag(9)
  • Frame transmission support over virtio(9)
  • enum hwsim_vqs(9)
  • enum hwsim_rate_info_attributes(9)

and that's the whole page, babes πŸ’– this one comes from ./drivers/net/wireless/virtual, dated October 2026, and it's filed under enum hwsim_tx_rate_flags(9) β€” go off, kernel docs, periodt πŸŽ€πŸ¦‹β­

πŸ“¦ where this page comes from