Commit d70d848a authored by Felix Fietkau's avatar Felix Fietkau Committed by Kalle Valo

ath9k: remove the sched field in struct ath_atx_tid

Use list_empty(&tid->list) instead
Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 592fa228
...@@ -244,7 +244,6 @@ struct ath_atx_tid { ...@@ -244,7 +244,6 @@ struct ath_atx_tid {
int baw_tail; /* next unused tx buffer slot */ int baw_tail; /* next unused tx buffer slot */
s8 bar_index; s8 bar_index;
bool sched;
bool active; bool active;
bool clear_ps_filter; bool clear_ps_filter;
}; };
......
...@@ -113,12 +113,9 @@ static void ath_tx_queue_tid(struct ath_softc *sc, struct ath_txq *txq, ...@@ -113,12 +113,9 @@ static void ath_tx_queue_tid(struct ath_softc *sc, struct ath_txq *txq,
if (!ctx) if (!ctx)
return; return;
if (tid->sched)
return;
tid->sched = true;
list = &ctx->acq[TID_TO_WME_AC(tid->tidno)]; list = &ctx->acq[TID_TO_WME_AC(tid->tidno)];
list_add_tail(&tid->list, list); if (list_empty(&tid->list))
list_add_tail(&tid->list, list);
} }
static struct ath_frame_info *get_frame_info(struct sk_buff *skb) static struct ath_frame_info *get_frame_info(struct sk_buff *skb)
...@@ -1541,15 +1538,14 @@ void ath_tx_aggr_sleep(struct ieee80211_sta *sta, struct ath_softc *sc, ...@@ -1541,15 +1538,14 @@ void ath_tx_aggr_sleep(struct ieee80211_sta *sta, struct ath_softc *sc,
ath_txq_lock(sc, txq); ath_txq_lock(sc, txq);
if (!tid->sched) { if (list_empty(&tid->list)) {
ath_txq_unlock(sc, txq); ath_txq_unlock(sc, txq);
continue; continue;
} }
buffered = ath_tid_has_buffered(tid); buffered = ath_tid_has_buffered(tid);
tid->sched = false; list_del_init(&tid->list);
list_del(&tid->list);
ath_txq_unlock(sc, txq); ath_txq_unlock(sc, txq);
...@@ -1929,8 +1925,7 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq) ...@@ -1929,8 +1925,7 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
break; break;
tid = list_first_entry(tid_list, struct ath_atx_tid, list); tid = list_first_entry(tid_list, struct ath_atx_tid, list);
list_del(&tid->list); list_del_init(&tid->list);
tid->sched = false;
if (ath_tx_sched_aggr(sc, txq, tid, &stop)) if (ath_tx_sched_aggr(sc, txq, tid, &stop))
sent = true; sent = true;
...@@ -2848,11 +2843,11 @@ void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an) ...@@ -2848,11 +2843,11 @@ void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an)
tid->seq_start = tid->seq_next = 0; tid->seq_start = tid->seq_next = 0;
tid->baw_size = WME_MAX_BA; tid->baw_size = WME_MAX_BA;
tid->baw_head = tid->baw_tail = 0; tid->baw_head = tid->baw_tail = 0;
tid->sched = false;
tid->active = false; tid->active = false;
tid->clear_ps_filter = true; tid->clear_ps_filter = true;
__skb_queue_head_init(&tid->buf_q); __skb_queue_head_init(&tid->buf_q);
__skb_queue_head_init(&tid->retry_q); __skb_queue_head_init(&tid->retry_q);
INIT_LIST_HEAD(&tid->list);
acno = TID_TO_WME_AC(tidno); acno = TID_TO_WME_AC(tidno);
tid->txq = sc->tx.txq_map[acno]; tid->txq = sc->tx.txq_map[acno];
} }
...@@ -2871,10 +2866,8 @@ void ath_tx_node_cleanup(struct ath_softc *sc, struct ath_node *an) ...@@ -2871,10 +2866,8 @@ void ath_tx_node_cleanup(struct ath_softc *sc, struct ath_node *an)
ath_txq_lock(sc, txq); ath_txq_lock(sc, txq);
if (tid->sched) { if (!list_empty(&tid->list))
list_del(&tid->list); list_del_init(&tid->list);
tid->sched = false;
}
ath_tid_drain(sc, txq, tid); ath_tid_drain(sc, txq, tid);
tid->active = false; tid->active = false;
......
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