mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-08 08:27:00 +00:00
LinuxKPI: 802.11: deal with stopped queues
Following 5a9a0d7803382321b5f9fff1deae5fb08463cf1a initialize the queue values explicitly and deal with a stopped queue in ieee80211_tx_dequeue(). Sponsored by: The FreeBSD Foundation MFC after: 3 days
This commit is contained in:
parent
27202b98dc
commit
0cbcfa1964
@ -244,9 +244,11 @@ lkpi_lsta_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN],
|
||||
ltxq->txq.ac = tid_to_mac80211_ac[tid & 7];
|
||||
}
|
||||
ltxq->seen_dequeue = false;
|
||||
ltxq->stopped = false;
|
||||
ltxq->txq.vif = vif;
|
||||
ltxq->txq.tid = tid;
|
||||
ltxq->txq.sta = sta;
|
||||
TAILQ_ELEM_INIT(ltxq, txq_entry);
|
||||
skb_queue_head_init(<xq->skbq);
|
||||
sta->txq[tid] = <xq->txq;
|
||||
}
|
||||
@ -2276,6 +2278,9 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ],
|
||||
vif->hw_queue[i] = i;
|
||||
else
|
||||
vif->hw_queue[i] = 0;
|
||||
|
||||
/* Initialize the queue to running. Stopped? */
|
||||
lvif->hw_queue_stopped[i] = false;
|
||||
}
|
||||
vif->cab_queue = IEEE80211_INVAL_HW_QUEUE;
|
||||
|
||||
@ -4268,13 +4273,25 @@ linuxkpi_ieee80211_tx_dequeue(struct ieee80211_hw *hw,
|
||||
struct ieee80211_txq *txq)
|
||||
{
|
||||
struct lkpi_txq *ltxq;
|
||||
struct lkpi_vif *lvif;
|
||||
struct sk_buff *skb;
|
||||
|
||||
skb = NULL;
|
||||
ltxq = TXQ_TO_LTXQ(txq);
|
||||
ltxq->seen_dequeue = true;
|
||||
|
||||
if (ltxq->stopped)
|
||||
goto stopped;
|
||||
|
||||
lvif = VIF_TO_LVIF(ltxq->txq.vif);
|
||||
if (lvif->hw_queue_stopped[ltxq->txq.ac]) {
|
||||
ltxq->stopped = true;
|
||||
goto stopped;
|
||||
}
|
||||
|
||||
skb = skb_dequeue(<xq->skbq);
|
||||
|
||||
stopped:
|
||||
return (skb);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user