• Johannes Berg's avatar
    mac80211: fix powersaving clients races · 50a9432d
    Johannes Berg authored
    The code to handle powersaving stations has a race:
    when the powersave flag is lifted from a station,
    we could transmit a packet that is being processed
    for TX at the same time right away, even if there
    are other frames queued for it. This would cause
    frame reordering. To fix this, lift the flag only
    under the appropriate lock that blocks TX.
    
    Additionally, the code to allow drivers to block a
    station while frames for it are on the HW queue is
    never re-enabled the station, so traffic would get
    stuck indefinitely. Fix this by clearing the flag
    for this appropriately.
    
    Finally, as an optimisation, don't do anything if
    the driver unblocks an already unblocked station.
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    50a9432d
ieee80211_i.h 39 KB