diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2021-04-18 18:45:32 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-04-21 20:55:52 +0200 |
commit | cb8ed33d4b3f4ef8cbff2d164bffeca678427f5a (patch) | |
tree | 334c770c0d437731184542d9eb253ad8a767a02c /drivers/net/wireless/mediatek/mt76/mt76.h | |
parent | 335e97ace24ade90aa5d5e8713bc448d2c276322 (diff) |
mt76: dma: add the capability to define a custom rx napi poll routine
Add the capability to define a custom rx napi callback for each driver.
This is a preliminary patch to properly support runtime-pm on rx side
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 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h index 0660b708156d..49f3e5985422 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76.h +++ b/drivers/net/wireless/mediatek/mt76/mt76.h @@ -170,7 +170,8 @@ struct mt76_mcu_ops { }; struct mt76_queue_ops { - int (*init)(struct mt76_dev *dev); + int (*init)(struct mt76_dev *dev, + int (*poll)(struct napi_struct *napi, int budget)); int (*alloc)(struct mt76_dev *dev, struct mt76_queue *q, int idx, int n_desc, int bufsize, @@ -802,7 +803,7 @@ static inline u16 mt76_rev(struct mt76_dev *dev) #define mt76xx_chip(dev) mt76_chip(&((dev)->mt76)) #define mt76xx_rev(dev) mt76_rev(&((dev)->mt76)) -#define mt76_init_queues(dev) (dev)->mt76.queue_ops->init(&((dev)->mt76)) +#define mt76_init_queues(dev, ...) (dev)->mt76.queue_ops->init(&((dev)->mt76), __VA_ARGS__) #define mt76_queue_alloc(dev, ...) (dev)->mt76.queue_ops->alloc(&((dev)->mt76), __VA_ARGS__) #define mt76_tx_queue_skb_raw(dev, ...) (dev)->mt76.queue_ops->tx_queue_skb_raw(&((dev)->mt76), __VA_ARGS__) #define mt76_tx_queue_skb(dev, ...) (dev)->mt76.queue_ops->tx_queue_skb(&((dev)->mt76), __VA_ARGS__) |