]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.19.31/mac80211-fix-tx-aggregation-session-tear-down-with-i.patch
Linux 4.14.108
[thirdparty/kernel/stable-queue.git] / releases / 4.19.31 / mac80211-fix-tx-aggregation-session-tear-down-with-i.patch
1 From 580f679ca3e4f135e72c836438e3cd720e98921c Mon Sep 17 00:00:00 2001
2 From: Ilan Peer <ilan.peer@intel.com>
3 Date: Wed, 6 Feb 2019 13:17:21 +0200
4 Subject: mac80211: Fix Tx aggregation session tear down with ITXQs
5
6 [ Upstream commit 6157ca0d6bfe437691b1e98a62e2efe12b6714da ]
7
8 When mac80211 requests the low level driver to stop an ongoing
9 Tx aggregation, the low level driver is expected to call
10 ieee80211_stop_tx_ba_cb_irqsafe() to indicate that it is ready
11 to stop the session. The callback in turn schedules a worker
12 to complete the session tear down, which in turn also handles
13 the relevant state for the intermediate Tx queue.
14
15 However, as this flow in asynchronous, the intermediate queue
16 should be stopped and not continue servicing frames, as in
17 such a case frames that are dequeued would be marked as part
18 of an aggregation, although the aggregation is already been
19 stopped.
20
21 Fix this by stopping the intermediate Tx queue, before
22 calling the low level driver to stop the Tx aggregation.
23
24 Signed-off-by: Ilan Peer <ilan.peer@intel.com>
25 Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
26 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
27 Signed-off-by: Sasha Levin <sashal@kernel.org>
28 ---
29 net/mac80211/agg-tx.c | 4 +++-
30 1 file changed, 3 insertions(+), 1 deletion(-)
31
32 diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
33 index 69e831bc317b..54821fb1a960 100644
34 --- a/net/mac80211/agg-tx.c
35 +++ b/net/mac80211/agg-tx.c
36 @@ -8,7 +8,7 @@
37 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>
38 * Copyright 2007-2010, Intel Corporation
39 * Copyright(c) 2015-2017 Intel Deutschland GmbH
40 - * Copyright (C) 2018 Intel Corporation
41 + * Copyright (C) 2018 - 2019 Intel Corporation
42 *
43 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License version 2 as
45 @@ -366,6 +366,8 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
46
47 set_bit(HT_AGG_STATE_STOPPING, &tid_tx->state);
48
49 + ieee80211_agg_stop_txq(sta, tid);
50 +
51 spin_unlock_bh(&sta->lock);
52
53 ht_dbg(sta->sdata, "Tx BA session stop requested for %pM tid %u\n",
54 --
55 2.19.1
56