mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-25 07:14:36 +08:00
staging: wfx: remove false-positive WARN()
The function wfx_tx_flush() wait for there is no more queued frames in hardware queue. Then, for the sanity, it checks that there is no more pending frame on any AC queue. However, there is a race here. It may happens that hardware queues are empty, but the counters of the AC queues are not yet updated. So, it may produce false-positive warning. The easiest way to solve the problem is just to remove the sanity check. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200515083325.378539-18-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a1ae4d07fd
commit
7c5fc1d88c
@ -30,7 +30,6 @@ void wfx_tx_unlock(struct wfx_dev *wdev)
|
||||
void wfx_tx_flush(struct wfx_dev *wdev)
|
||||
{
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
// Do not wait for any reply if chip is frozen
|
||||
if (wdev->chip_frozen)
|
||||
@ -41,12 +40,6 @@ void wfx_tx_flush(struct wfx_dev *wdev)
|
||||
ret = wait_event_timeout(wdev->hif.tx_buffers_empty,
|
||||
!wdev->hif.tx_buffers_used,
|
||||
msecs_to_jiffies(3000));
|
||||
if (ret) {
|
||||
for (i = 0; i < IEEE80211_NUM_ACS; i++)
|
||||
WARN(atomic_read(&wdev->tx_queue[i].pending_frames),
|
||||
"there are still %d pending frames on queue %d",
|
||||
atomic_read(&wdev->tx_queue[i].pending_frames), i);
|
||||
}
|
||||
if (!ret) {
|
||||
dev_warn(wdev->dev, "cannot flush tx buffers (%d still busy)\n",
|
||||
wdev->hif.tx_buffers_used);
|
||||
|
Loading…
Reference in New Issue
Block a user