ENUM HWSIM_TX_RATE_FLAGS(9)
β¨ 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 isNL80211_CHAN_HT40MINUSorNL80211_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 theidxfield 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
- 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