Reschedule runtime-pm after receiving a tx interrupt.
Update runtime-pm last activity before injecting packets
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
mt7615_tx_cleanup(dev);
+ mt7615_pm_power_save_sched(dev);
tasklet_schedule(&dev->mt76.tx_tasklet);
return 0;
dev_kfree_skb(skb);
+ if (test_bit(MT76_STATE_PM, &dev->phy.mt76->state))
+ return;
+
rcu_read_lock();
mt7615_mac_sta_poll(dev);
rcu_read_unlock();
+ mt7615_pm_power_save_sched(dev);
tasklet_schedule(&dev->mt76.tx_tasklet);
}
return;
}
+ dev->pm.last_activity = jiffies;
tasklet_schedule(&dev->mt76.tx_tasklet);
}
}
if (!test_bit(MT76_STATE_PM, &mphy->state)) {
+ dev->pm.last_activity = jiffies;
mt76_tx(mphy, control->sta, wcid, skb);
return;
}