Commit 0825af2d authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

mt76: mt7615: reschedule runtime-pm receiving a tx interrupt

Reschedule runtime-pm after receiving a tx interrupt.
Update runtime-pm last activity before injecting packets
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 763d750c
...@@ -122,6 +122,7 @@ static int mt7615_poll_tx(struct napi_struct *napi, int budget) ...@@ -122,6 +122,7 @@ static int mt7615_poll_tx(struct napi_struct *napi, int budget)
mt7615_tx_cleanup(dev); mt7615_tx_cleanup(dev);
mt7615_pm_power_save_sched(dev);
tasklet_schedule(&dev->mt76.tx_tasklet); tasklet_schedule(&dev->mt76.tx_tasklet);
return 0; return 0;
......
...@@ -1439,10 +1439,14 @@ static void mt7615_mac_tx_free(struct mt7615_dev *dev, struct sk_buff *skb) ...@@ -1439,10 +1439,14 @@ static void mt7615_mac_tx_free(struct mt7615_dev *dev, struct sk_buff *skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
if (test_bit(MT76_STATE_PM, &dev->phy.mt76->state))
return;
rcu_read_lock(); rcu_read_lock();
mt7615_mac_sta_poll(dev); mt7615_mac_sta_poll(dev);
rcu_read_unlock(); rcu_read_unlock();
mt7615_pm_power_save_sched(dev);
tasklet_schedule(&dev->mt76.tx_tasklet); tasklet_schedule(&dev->mt76.tx_tasklet);
} }
......
...@@ -706,6 +706,7 @@ mt7615_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq) ...@@ -706,6 +706,7 @@ mt7615_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq)
return; return;
} }
dev->pm.last_activity = jiffies;
tasklet_schedule(&dev->mt76.tx_tasklet); tasklet_schedule(&dev->mt76.tx_tasklet);
} }
...@@ -735,6 +736,7 @@ static void mt7615_tx(struct ieee80211_hw *hw, ...@@ -735,6 +736,7 @@ static void mt7615_tx(struct ieee80211_hw *hw,
} }
if (!test_bit(MT76_STATE_PM, &mphy->state)) { if (!test_bit(MT76_STATE_PM, &mphy->state)) {
dev->pm.last_activity = jiffies;
mt76_tx(mphy, control->sta, wcid, skb); mt76_tx(mphy, control->sta, wcid, skb);
return; return;
} }
......
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