Skip to content

Commit

Permalink
tx: move state check in mt76_txq_send_burst()
Browse files Browse the repository at this point in the history
Move device state check in mt76_txq_send_burst() in order to be more
reactive in stopping tx process during hw reset

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
  • Loading branch information
LorenzoBianconi authored and nbd168 committed Jul 17, 2017
1 parent 8dee788 commit 3c4c9a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tx.c
Expand Up @@ -332,6 +332,10 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_queue *hwq,
if (probe)
break;

if (test_bit(MT76_SCANNING, &dev->state) ||
test_bit(MT76_RESET, &dev->state))
return -EBUSY;

skb = mt76_txq_dequeue(dev, mtxq, false);
if (!skb) {
*empty = true;
Expand Down Expand Up @@ -418,10 +422,6 @@ void mt76_txq_schedule(struct mt76_dev *dev, struct mt76_queue *hwq)
{
int len;

if (test_bit(MT76_SCANNING, &dev->state) ||
test_bit(MT76_RESET, &dev->state))
return;

do {
if (hwq->swq_queued >= 4 || list_empty(&hwq->swq))
break;
Expand Down

0 comments on commit 3c4c9a6

Please sign in to comment.