• Helmut Schaa's avatar
    rt2x00: Work around hw aggregation oddity in rt2800 · b34793ee
    Helmut Schaa authored
    If a frame is not meant to be sent as AMPDU or part of it the hw might
    still decide to aggregate this frame if a previous frame started an
    AMPDU. However, this will limit the usefulness of the reported tx rate
    since the reported rate will be the one specified in the TXWI of the
    first frame and thus it is not possible to reliably caculate the
    number of retrys by substracting the reported tx rate from the tx rate
    in the TXWI.
    
    To fix this issue, only report the successful rate for frames that were
    not meant to be aggregated but ended up in an aggregate.
    
    Example:
    Frame A (MCS7, AMPDU=1) B (MCS7, AMPDU=1) C (MCS12, AMDPU=0, PROBE_RATE)
    
    Although frame C shoudn't be aggregated the hw might sill put it
    into an AMPDU together with A and B. If the transmission succeeds the tx
    status will contain MCS7 for all three frames. In that case we should
    only report MCS7 as success rate and avoid reporting MCS12-MCS8 as
    failed tx attempts as this will affect the future rate control
    decisions.
    
    This oddity might strike us in other scenarious as well but the most
    common "wrong" report happened for frames used to probe a different tx
    rate.
    
    This improves the rate control decisions notable.
    Signed-off-by: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
    Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    b34793ee
rt2800lib.c 112 KB