mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt792x: enable USB UDMA TX timeout
Configure the USB UDMA TX timeout limit and enable timeout detection during DMA initialization, matching the vendor driver setup. Use a longer timeout to avoid false alarms. Signed-off-by: Sean Wang <[email protected]> Link: https://patch.msgid.link/[email protected]
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "mt792x.h"
|
||||
#include "mt76_connac2_mac.h"
|
||||
|
||||
#define MT792X_USB_TX_TIMEOUT_LIMIT 50000
|
||||
#define MT792X_USB_UDMA_IDLE_TIMEOUT 1000
|
||||
|
||||
static int mt792xu_read32(struct mt76_dev *dev, u32 addr, void *buf)
|
||||
@@ -396,6 +397,10 @@ int mt792xu_dma_init(struct mt792x_dev *dev, bool resume)
|
||||
mt76_set(dev, MT_UDMA_WLCFG_0,
|
||||
MT_WL_RX_EN | MT_WL_TX_EN |
|
||||
MT_WL_RX_MPSZ_PAD0 | MT_TICK_1US_EN);
|
||||
mt76_rmw(dev, MT_UDMA_WLCFG_1, MT_WL_TX_TMOUT_LMT,
|
||||
FIELD_PREP(MT_WL_TX_TMOUT_LMT,
|
||||
MT792X_USB_TX_TIMEOUT_LIMIT));
|
||||
mt76_set(dev, MT_UDMA_WLCFG_0, MT_WL_TX_TMOUT_FUNC_EN);
|
||||
mt76_clear(dev, MT_UDMA_WLCFG_0,
|
||||
MT_WL_RX_AGG_TO | MT_WL_RX_AGG_LMT);
|
||||
mt76_clear(dev, MT_UDMA_WLCFG_1, MT_WL_RX_AGG_PKT_LMT);
|
||||
|
||||
Reference in New Issue
Block a user