Skip to content

Commit

Permalink
mt76: introduce mt76_txq_id field in mt76_queue_entry
Browse files Browse the repository at this point in the history
Add mt76_txq_id field to mt76_queue_entry in order to properly
track outstanding frames for mt7615 that relies on a single hw queue

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
LorenzoBianconi authored and nbd168 committed Mar 13, 2019
1 parent 06c917f commit 2dc63b0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dma.c
Expand Up @@ -164,7 +164,7 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush)
while (q->queued && q->tail != last) {
mt76_dma_tx_cleanup_idx(dev, q, q->tail, &entry);
if (entry.schedule)
dev->q_tx[qid].swq_queued--;
dev->q_tx[entry.qid].swq_queued--;

q->tail = (q->tail + 1) % q->ndesc;
q->queued--;
Expand Down
1 change: 1 addition & 0 deletions mt76.h
Expand Up @@ -100,6 +100,7 @@ struct mt76_queue_entry {
struct mt76_txwi_cache *txwi;
struct mt76u_buf ubuf;
};
enum mt76_txq_id qid;
bool schedule;
};

Expand Down
1 change: 1 addition & 0 deletions tx.c
Expand Up @@ -468,6 +468,7 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_sw_queue *sq,
} while (n_frames < limit);

if (!probe) {
hwq->entry[idx].qid = sq - dev->q_tx;
hwq->entry[idx].schedule = true;
sq->swq_queued++;
}
Expand Down

0 comments on commit 2dc63b0

Please sign in to comment.