diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2023-12-12 10:15:19 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2024-02-22 09:55:18 +0100 |
commit | 3c37da57131fe5a9fd3bbda94bf583812e0d543b (patch) | |
tree | 56f8ac48c275486f3d5c810382dbf86632d47845 /drivers/net/wireless/mediatek/mt76/mt76.h | |
parent | 8a7386e787ef4d9649930bb09cdf55ccd2102346 (diff) | |
download | lwn-3c37da57131fe5a9fd3bbda94bf583812e0d543b.tar.gz lwn-3c37da57131fe5a9fd3bbda94bf583812e0d543b.zip |
wifi: mt76: set page_pool napi pointer for mmio devices
In order to recycle skbs in the page_pool "hot" cache in
napi_pp_put_page routine, set napi pointer for MMIO devices in
mt76_create_page_pool().
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 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h index ac969a88438b..a91f6ddacbd9 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76.h +++ b/drivers/net/wireless/mediatek/mt76/mt76.h @@ -1607,6 +1607,18 @@ s8 mt76_get_rate_power_limits(struct mt76_phy *phy, struct mt76_power_limits *dest, s8 target_power); +static inline bool mt76_queue_is_rx(struct mt76_dev *dev, struct mt76_queue *q) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(dev->q_rx); i++) { + if (q == &dev->q_rx[i]) + return true; + } + + return false; +} + static inline bool mt76_queue_is_wed_tx_free(struct mt76_queue *q) { return (q->flags & MT_QFLAG_WED) && |