mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-14 02:19:06 +04:00
With HAS_RATE_CONTROL, mac80211 leaves the rate entries of every frame cleared, so hwsim reported no rate for it, an MLD station reported no TX bit rate, and a medium in userspace sent the frame at the lowest rate. Send such a frame at one rate, with one attempt and the rate list ended after that entry. For a data frame to a peer, take the highest VHT or HT MCS that the peer receives on the channel width in use, as a rate controller settles on for an ideal channel; otherwise take the highest legacy rate of the band. Stop at four streams, as minstrel_ht does (MINSTREL_MAX_STREAMS): hwsim declares MCS 0-9 for all eight streams, and ieee80211_get_rate_duration() warns for more than four streams on a VHT rate. Signed-off-by: Felix Fietkau <nbd@nbd.name>