1 From: Felix Fietkau <nbd@openwrt.org>
2 Date: Sat, 4 Apr 2015 18:42:33 +0200
3 Subject: [PATCH] ath9k: remove the sched field in struct ath_atx_tid
5 Use list_empty(&tid->list) instead
7 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
11 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
12 @@ -245,7 +245,6 @@ struct ath_atx_tid {
13 int baw_tail; /* next unused tx buffer slot */
20 --- a/drivers/net/wireless/ath/ath9k/xmit.c
21 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
22 @@ -113,12 +113,9 @@ static void ath_tx_queue_tid(struct ath_
30 list = &ctx->acq[TID_TO_WME_AC(tid->tidno)];
31 - list_add_tail(&tid->list, list);
32 + if (list_empty(&tid->list))
33 + list_add_tail(&tid->list, list);
36 static struct ath_frame_info *get_frame_info(struct sk_buff *skb)
37 @@ -1556,15 +1553,14 @@ void ath_tx_aggr_sleep(struct ieee80211_
39 ath_txq_lock(sc, txq);
42 + if (list_empty(&tid->list)) {
43 ath_txq_unlock(sc, txq);
47 buffered = ath_tid_has_buffered(tid);
50 - list_del(&tid->list);
51 + list_del_init(&tid->list);
53 ath_txq_unlock(sc, txq);
55 @@ -1944,8 +1940,7 @@ void ath_txq_schedule(struct ath_softc *
58 tid = list_first_entry(tid_list, struct ath_atx_tid, list);
59 - list_del(&tid->list);
61 + list_del_init(&tid->list);
63 if (ath_tx_sched_aggr(sc, txq, tid, &stop))
65 @@ -2863,11 +2858,11 @@ void ath_tx_node_init(struct ath_softc *
66 tid->seq_start = tid->seq_next = 0;
67 tid->baw_size = WME_MAX_BA;
68 tid->baw_head = tid->baw_tail = 0;
71 tid->clear_ps_filter = true;
72 __skb_queue_head_init(&tid->buf_q);
73 __skb_queue_head_init(&tid->retry_q);
74 + INIT_LIST_HEAD(&tid->list);
75 acno = TID_TO_WME_AC(tidno);
76 tid->txq = sc->tx.txq_map[acno];
78 @@ -2886,10 +2881,8 @@ void ath_tx_node_cleanup(struct ath_soft
80 ath_txq_lock(sc, txq);
83 - list_del(&tid->list);
86 + if (!list_empty(&tid->list))
87 + list_del_init(&tid->list);
89 ath_tid_drain(sc, txq, tid);