Commit 763d750c authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

mt76: do not inject packets if MT76_STATE_PM is set

Do not tx packets in mt76_txq_send_burst() or mt76_txq_schedule_list()
if the device is in runtime-pm
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent cddaaa56
......@@ -460,7 +460,8 @@ mt76_txq_send_burst(struct mt76_phy *phy, struct mt76_sw_queue *sq,
if (probe)
break;
if (test_bit(MT76_RESET, &phy->state))
if (test_bit(MT76_STATE_PM, &phy->state) ||
test_bit(MT76_RESET, &phy->state))
return -EBUSY;
skb = mt76_txq_dequeue(phy, mtxq, false);
......@@ -516,7 +517,8 @@ mt76_txq_schedule_list(struct mt76_phy *phy, enum mt76_txq_id qid)
if (sq->swq_queued >= 4)
break;
if (test_bit(MT76_RESET, &phy->state)) {
if (test_bit(MT76_STATE_PM, &phy->state) ||
test_bit(MT76_RESET, &phy->state)) {
ret = -EBUSY;
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment