mt76: adjust for mac80211 txq scheduling API changes

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2019-03-19 10:09:15 +01:00
parent 223649049a
commit e7bd802cf7
2 changed files with 18 additions and 2 deletions
+15
View File
@@ -562,6 +562,7 @@ mt76_check_sta(struct mt76_dev *dev, struct sk_buff *skb)
struct ieee80211_sta *sta;
struct mt76_wcid *wcid = status->wcid;
bool ps;
int i;
if (ieee80211_is_pspoll(hdr->frame_control) && !wcid) {
sta = ieee80211_find_sta_by_ifaddr(dev->hw, hdr->addr2, NULL);
@@ -608,6 +609,20 @@ mt76_check_sta(struct mt76_dev *dev, struct sk_buff *skb)
dev->drv->sta_ps(dev, sta, ps);
ieee80211_sta_ps_transition(sta, ps);
if (ps)
return;
for (i = 0; i < ARRAY_SIZE(sta->txq); i++) {
struct mt76_txq *mtxq;
if (!sta->txq[i])
continue;
mtxq = (struct mt76_txq *) sta->txq[i]->drv_priv;
if (!skb_queue_empty(&mtxq->retry_q))
ieee80211_schedule_txq(dev->hw, sta->txq[i]);
}
}
void mt76_rx_complete(struct mt76_dev *dev, struct sk_buff_head *frames,
+3 -2
View File
@@ -524,8 +524,9 @@ mt76_txq_schedule_list(struct mt76_dev *dev, enum mt76_txq_id qid)
}
ret += mt76_txq_send_burst(dev, sq, mtxq, &empty);
if (!empty)
ieee80211_return_txq(dev->hw, txq);
if (skb_queue_empty(&mtxq->retry_q))
empty = true;
ieee80211_return_txq(dev->hw, txq, !empty);
}
spin_unlock_bh(&hwq->lock);