1 From: Johannes Berg <johannes.berg@intel.com>
2 Date: Fri, 19 Mar 2021 23:28:01 +0100
3 Subject: [PATCH] mac80211: don't apply flow control on management frames
5 In some cases (depending on the driver, but it's true e.g. for
6 iwlwifi) we're using an internal TXQ for management packets,
7 mostly to simplify the code and to have a place to queue them.
8 However, it appears that in certain cases we can confuse the
9 code and management frames are dropped, which is certainly not
12 Short-circuit the processing of management frames. To keep the
13 impact minimal, only put them on the frags queue and check the
14 tid == management only for doing that and to skip the airtime
15 fairness checks, if applicable.
17 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
20 --- a/net/mac80211/tx.c
21 +++ b/net/mac80211/tx.c
23 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
24 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
25 * Copyright 2013-2014 Intel Mobile Communications GmbH
26 - * Copyright (C) 2018-2020 Intel Corporation
27 + * Copyright (C) 2018-2021 Intel Corporation
29 * Transmit and frame generation functions.
31 @@ -1388,8 +1388,17 @@ static void ieee80211_txq_enqueue(struct
32 ieee80211_set_skb_enqueue_time(skb);
34 spin_lock_bh(&fq->lock);
35 - fq_tin_enqueue(fq, tin, flow_idx, skb,
38 + * For management frames, don't really apply codel etc.,
39 + * we don't want to apply any shaping or anything we just
40 + * want to simplify the driver API by having them on the
43 + if (unlikely(txqi->txq.tid == IEEE80211_NUM_TIDS))
44 + __skb_queue_tail(&txqi->frags, skb);
46 + fq_tin_enqueue(fq, tin, flow_idx, skb,
48 spin_unlock_bh(&fq->lock);
51 @@ -3853,6 +3862,9 @@ bool ieee80211_txq_airtime_check(struct
55 + if (unlikely(txq->tid == IEEE80211_NUM_TIDS))
58 sta = container_of(txq->sta, struct sta_info, sta);
59 if (atomic_read(&sta->airtime[txq->ac].aql_tx_pending) <
60 sta->airtime[txq->ac].aql_limit_low)