mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: redefine mt76_for_each_q_rx to adapt mt7986 changes
Check ndesc of q_rx to avoid potential hole in iteration. This is an intermediate patch to add mt7986 support. Signed-off-by: Sujuan Chen <[email protected]> Signed-off-by: Bo Jiao <[email protected]> Reviewed-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -908,8 +908,8 @@ static inline u16 mt76_rev(struct mt76_dev *dev)
|
||||
#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) && \
|
||||
(dev)->q_rx[i].ndesc; i++)
|
||||
for (i = 0; i < ARRAY_SIZE((dev)->q_rx); i++) \
|
||||
if ((dev)->q_rx[i].ndesc)
|
||||
|
||||
struct mt76_dev *mt76_alloc_device(struct device *pdev, unsigned int size,
|
||||
const struct ieee80211_ops *ops,
|
||||
|
||||
Reference in New Issue
Block a user