diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2019-03-27 10:58:28 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-04-25 19:43:06 +0300 |
commit | e5ceab9df43771f64a63ff06dbbbf455103976fc (patch) | |
tree | 3c788a970a212cf3dc5443c7248a34b3e50c06cc /drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | |
parent | 2c7ba758cc4b5bb2ce30c52129c5fb69174cd610 (diff) | |
download | linux-e5ceab9df43771f64a63ff06dbbbf455103976fc.tar.gz linux-e5ceab9df43771f64a63ff06dbbbf455103976fc.tar.bz2 linux-e5ceab9df43771f64a63ff06dbbbf455103976fc.zip |
rt2800mmio: use timer and work for handling tx statuses timeouts
Sometimes we can get into situation when there are pending statuses,
but we do not get INT_SOURCE_CSR_TX_FIFO_STATUS. Handle this situation
by arming timeout timer and read statuses (it will fix case when
we just do not have irq) and queue work to handle case we missed
statues from hardware FIFO.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ralink/rt2x00/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c index 357c0941aaad..bdc55d649a88 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c @@ -1391,6 +1391,8 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev) mutex_init(&rt2x00dev->conf_mutex); INIT_LIST_HEAD(&rt2x00dev->bar_list); spin_lock_init(&rt2x00dev->bar_list_lock); + hrtimer_init(&rt2x00dev->txstatus_timer, CLOCK_MONOTONIC, + HRTIMER_MODE_REL); set_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags); @@ -1515,6 +1517,8 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev) cancel_delayed_work_sync(&rt2x00dev->autowakeup_work); cancel_work_sync(&rt2x00dev->sleep_work); + hrtimer_cancel(&rt2x00dev->txstatus_timer); + /* * Kill the tx status tasklet. */ |