• Felix Fietkau's avatar
    mac80211: minstrel: remove deferred sampling code · 4fe40b8e
    Felix Fietkau authored
    Deferring sampling attempts to the second stage has some bad interactions
    with drivers that process the rate table in hardware and use the probe flag
    to indicate probing packets (e.g. most mt76 drivers). On affected drivers
    it can lead to probing not working at all.
    
    If the link conditions turn worse, it might not be such a good idea to
    do a lot of sampling for lower rates in this case.
    
    Fix this by simply skipping the sample attempt instead of deferring it,
    but keep the checks that would allow it to be sampled if it was skipped
    too often, but only if it has less than 95% success probability.
    
    Also ensure that IEEE80211_TX_CTL_RATE_CTRL_PROBE is set for all probing
    packets.
    
    Cc: stable@vger.kernel.org
    Fixes: cccf129f ("mac80211: add the 'minstrel' rate control algorithm")
    Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
    Link: https://lore.kernel.org/r/20201111183359.43528-2-nbd@nbd.nameSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    4fe40b8e
rc80211_minstrel.c 16.8 KB