diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2021-03-07 19:20:49 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-04-12 00:01:25 +0200 |
commit | 3990465db6829c91e8ebfde51ba2d98885020249 (patch) | |
tree | 17ba6e78fbade51c1401dde250f896f9a97832ce /drivers/net/wireless/mediatek/mt76/mt76.h | |
parent | 1f7396acfef4691b8cf4a3e631fd3f59d779c0f2 (diff) | |
download | linux-stable-3990465db6829c91e8ebfde51ba2d98885020249.tar.gz linux-stable-3990465db6829c91e8ebfde51ba2d98885020249.tar.bz2 linux-stable-3990465db6829c91e8ebfde51ba2d98885020249.zip |
mt76: dma: introduce mt76_dma_queue_reset routine
Introduce mt76_dma_queue_reset utility routine to reset a given hw
queue. This is a preliminary patch to introduce mt7921 chip reset
support.
Co-developed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76.h')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h index 4945b0430380..b21a72467927 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76.h +++ b/drivers/net/wireless/mediatek/mt76/mt76.h @@ -192,6 +192,8 @@ struct mt76_queue_ops { bool flush); void (*kick)(struct mt76_dev *dev, struct mt76_queue *q); + + void (*reset_q)(struct mt76_dev *dev, struct mt76_queue *q); }; enum mt76_wcid_flags { @@ -796,6 +798,7 @@ static inline u16 mt76_rev(struct mt76_dev *dev) #define mt76_queue_rx_reset(dev, ...) (dev)->mt76.queue_ops->rx_reset(&((dev)->mt76), __VA_ARGS__) #define mt76_queue_tx_cleanup(dev, ...) (dev)->mt76.queue_ops->tx_cleanup(&((dev)->mt76), __VA_ARGS__) #define mt76_queue_kick(dev, ...) (dev)->mt76.queue_ops->kick(&((dev)->mt76), __VA_ARGS__) +#define mt76_queue_reset(dev, ...) (dev)->mt76.queue_ops->reset_q(&((dev)->mt76), __VA_ARGS__) #define mt76_for_each_q_rx(dev, i) \ for (i = 0; i < ARRAY_SIZE((dev)->q_rx) && \ |