]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.108/mac80211-fix-tx-aggregation-session-tear-down-with-i.patch
Linux 4.14.108
[thirdparty/kernel/stable-queue.git] / releases / 4.14.108 / mac80211-fix-tx-aggregation-session-tear-down-with-i.patch
CommitLineData
ecf3b270
SL
1From 5f479efd921f08a4a9f64db734c46e86ff6454de Mon Sep 17 00:00:00 2001
2From: Ilan Peer <ilan.peer@intel.com>
3Date: Wed, 6 Feb 2019 13:17:21 +0200
4Subject: mac80211: Fix Tx aggregation session tear down with ITXQs
5
6[ Upstream commit 6157ca0d6bfe437691b1e98a62e2efe12b6714da ]
7
8When mac80211 requests the low level driver to stop an ongoing
9Tx aggregation, the low level driver is expected to call
10ieee80211_stop_tx_ba_cb_irqsafe() to indicate that it is ready
11to stop the session. The callback in turn schedules a worker
12to complete the session tear down, which in turn also handles
13the relevant state for the intermediate Tx queue.
14
15However, as this flow in asynchronous, the intermediate queue
16should be stopped and not continue servicing frames, as in
17such a case frames that are dequeued would be marked as part
18of an aggregation, although the aggregation is already been
19stopped.
20
21Fix this by stopping the intermediate Tx queue, before
22calling the low level driver to stop the Tx aggregation.
23
24Signed-off-by: Ilan Peer <ilan.peer@intel.com>
25Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
26Signed-off-by: Johannes Berg <johannes.berg@intel.com>
27Signed-off-by: Sasha Levin <sashal@kernel.org>
28---
29 net/mac80211/agg-tx.c | 4 +++-
30 1 file changed, 3 insertions(+), 1 deletion(-)
31
32diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
33index 197947a07f83..ed57db9b6086 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@@ -361,6 +361,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--
552.19.1
56