• Yu-Yen Ting's avatar
    rtw88: Fix potential unrecoverable tx queue stop · a548909d
    Yu-Yen Ting authored
    If there are lots of packets to be transmitted, the driver would check
    whether the available descriptors are sufficient according the read/write
    point of tx queue. Once the available descriptor is not enough,
    ieee80211_stop_queue is called.
    
    TX ISR, meanwhile, is releasing the tx resources after the packets are
    transmitted. This routine may call ieee80211_wake_queue by checking the
    available descriptor.
    
    The potential queue stop problem would occur when the tx queue is
    stopped due to the heavy traffic. Then thare is no chance to wake the
    queue up because the read point is not updated immediately, as a result,
    no more packets coulde be transmitted in this queue.
    
    This patch makes sure the ieee80211_wake_queue could be called properly
    and avoids the race condition when ring->r.rp, ring->queue_stopped are
    updated.
    Signed-off-by: default avatarYu-Yen Ting <steventing@realtek.com>
    Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
    Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
    Link: https://lore.kernel.org/r/20210415084703.27255-3-pkshih@realtek.com
    a548909d
pci.c 45.6 KB